@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Use the TickWatch grid font chain for all app grids */
.quickgrid-roboto,
.quickgrid-roboto * {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
}

body {
    min-height: 100vh;
}

a, .btn-link {
    color: var(--fox-link);
}

.btn-primary {
    color: var(--fox-tooltip-text);
    background-color: var(--fox-primary);
    border-color: var(--fox-primary);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--fox-surface), 0 0 0 0.25rem var(--fox-primary-soft);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.rfd-backdrop {
    position: fixed;
    inset: 0;
    background: var(--fox-overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.rfd-modal {
    width: min(900px, 96vw);
    max-height: 90vh;
    background: var(--fox-surface);
    border-radius: 12px;
    box-shadow: var(--fox-popup-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rfd-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--fox-dialog-border);
}

.rfd-title {
    font-weight: 600;
}

.rfd-body {
    padding: 1rem;
    overflow: auto;
}

.rfd-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--fox-border);
}

    .rfd-row:last-child {
        border-bottom: none;
    }

.rfd-label {
    font-size: 0.9rem;
    color: var(--fox-text-muted);
    padding-top: 0.25rem;
}

.rfd-inputs {
    display: grid;
    grid-auto-flow: row;
    gap: 0.5rem;
}

.rfd-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--fox-dialog-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .rfd-row {
        grid-template-columns: 1fr;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--fox-positive);
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* --- QuickGrid scroll behavior (global, non-isolated) --- */
.qg-root {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.qg-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

    .qg-scroll table {
        width: max-content !important;
        min-width: max-content !important;
        table-layout: auto !important;
    }

    .qg-scroll th,
    .qg-scroll td {
        white-space: nowrap;
        width: max-content;
    }

.report-search-toggle,
.report-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
}

.report-menu-item-line {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.report-mode-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    flex: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1;
}

.report-menu-item-title {
    min-width: 0;
}

.min-w-0 {
    min-width: 0;
}

/* --- Sidebar tree --- */
.report-menu-tree {
    min-height: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden;
}

 .report-menu-search {
    flex: 0 0 auto;
    position: relative;
    z-index: 30;
    background: var(--fox-surface-2);
    padding: 0 0.2rem 0.7rem;
    margin-bottom: 0.1rem;
    box-shadow: 0 6px 10px -10px var(--fox-border-strong);
}

.report-menu-scroll {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.15rem;
}

.report-menu-search .form-control {
    height: 2.45rem;
    border-radius: 0.85rem;
    border: 1px solid var(--fox-border);
    background: var(--fox-surface);
    box-shadow: none;
    font-size: 0.92rem;
    padding-left: 0.9rem;
}

.report-menu-search .form-control:focus {
    border-color: color-mix(in srgb, var(--fox-accent, var(--fox-link)) 36%, var(--fox-border));
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--fox-accent, var(--fox-link)) 12%, transparent);
}

.fr-tree {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: stretch;
}

.fr-group {
    border: 1px solid var(--fox-border);
    border-radius: 0.95rem;
    overflow: hidden;
    background: var(--fox-surface);
    box-shadow: var(--fox-shadow-sm);
}

.fr-group-toggle,
.fr-section-toggle,
.fr-report-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.fr-group-toggle,
.fr-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    cursor: pointer;
    justify-content: flex-start;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fr-group-toggle {
    padding: 0.82rem 0.78rem;
    background: var(--fox-surface-2);
    color: var(--fox-text-soft);
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 1px solid var(--fox-border);
}

.fr-section-toggle {
    padding: 0.58rem 0.78rem 0.35rem;
    background: var(--fox-surface);
    color: var(--fox-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 0;
}

.fr-group-body,
.fr-section-body {
    display: none;
}

.fr-group-body.is-open,
.fr-section-body.is-open {
    display: block;
}

.fr-group-body {
    padding-bottom: 0.25rem;
}

.fr-section-body,
.fr-section-body-noheader {
    background: var(--fox-surface);
}

.fr-section-body {
    padding: 0 0.35rem 0.3rem 0.35rem;
}

.fr-section-body-noheader {
    display: block;
    padding: 0.35rem;
}

.fr-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.9rem;
    flex: 0 0 0.9rem;
    transition: transform 0.15s ease, color 0.15s ease;
    font-size: 0.72rem;
    color: var(--fox-text-muted);
    opacity: 0.95;
}

.fr-group-toggle.is-open .fr-chevron,
.fr-section-toggle.is-open .fr-chevron {
    transform: rotate(90deg);
    color: var(--fox-text);
}

.fr-group-title,
.fr-section-title,
.report-menu-item-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fr-report-item {
    display: block;
    margin: 0.12rem 0;
    padding: 0.62rem 0.7rem;
    background: var(--fox-surface);
    color: var(--fox-text-soft);
    font-size: 0.94rem;
    font-weight: 500;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.fr-section-body .fr-report-item,
.fr-section-body-noheader .fr-report-item {
    padding-left: 0.7rem;
}

.fr-group-toggle:hover {
    background: var(--fox-control-hover-bg);
}

.fr-section-toggle:hover {
    color: var(--fox-text);
}

.fr-group-toggle:hover .fr-chevron,
.fr-section-toggle:hover .fr-chevron {
    color: var(--fox-text);
}

.fr-report-item:hover {
    background: var(--fox-control-hover-bg);
    color: var(--fox-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fox-control-hover-border) 45%, transparent);
}

.fr-report-item:focus-visible,
.fr-group-toggle:focus-visible,
.fr-section-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--fox-accent, var(--fox-link)) 16%, transparent);
}

.fr-report-item.active {
    background: var(--fox-selection-bg, color-mix(in srgb, var(--fox-accent, var(--fox-link)) 14%, var(--fox-surface)));
    color: var(--fox-text);
    box-shadow: inset 0 0 0 1px var(--fox-selection-border, color-mix(in srgb, var(--fox-accent, var(--fox-link)) 35%, var(--fox-border)));
}

.fr-report-item.active:hover {
    background: var(--fox-selection-hover-bg, color-mix(in srgb, var(--fox-accent, var(--fox-link)) 20%, var(--fox-surface)));
}

.fr-report-item.active .report-mode-icon {
    color: var(--fox-selection-accent, var(--fox-accent, var(--fox-link)));
}


.reports-menu-panel__body {
    position: relative;
}

.top-nav-shell__account-menu {
    position: relative;
}

.top-nav-shell__account-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    color: var(--fox-tooltip-text);
    font-weight: 500;
}

.top-nav-shell__account-summary::-webkit-details-marker {
    display: none;
}

.top-nav-shell__account-dropdown {
    position: absolute;
    right: 0;
    margin-top: 0.45rem;
    min-width: 8rem;
    padding: 0.35rem;
    background: var(--fox-surface);
    border: 1px solid var(--fox-border);
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.top-nav-shell__dropdown-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 0.55rem;
    padding: 0.5rem 0.7rem;
}

.top-nav-shell__dropdown-button:hover {
    background: var(--fox-control-hover-bg);
}


.trading-report-page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trading-report-toolbar {
    display: flex;
    align-items: end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.trading-report-toolbar__field {
    min-width: 14rem;
    max-width: 18rem;
}

.trading-report-toolbar__field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--fox-text-soft);
}

.trading-report-alert,
.trading-report-state {
    margin: 0;
}

.trading-report-state {
    min-height: 6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fox-text-muted);
}


/* Scoped logs */
.scoped-logs-table-wrap {
    max-height: calc(100vh - 220px);
    border: 1px solid var(--fox-border);
    border-radius: 10px;
    background: var(--fox-surface);
}

.scoped-logs-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--fox-surface);
    vertical-align: middle;
}

.scoped-logs-table thead .scoped-log-filter-row th {
    top: 37px;
    z-index: 1;
    background: var(--fox-surface);
}

.scoped-logs-table thead input,
.scoped-logs-table thead select {
    min-width: 0;
}

.scoped-log-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
}

.scoped-log-level-info {
    color: #0c63e4;
    background: color-mix(in srgb, var(--fox-info, var(--fox-accent, var(--fox-link))) 14%, transparent);
    border-color: color-mix(in srgb, var(--fox-info, var(--fox-accent, var(--fox-link))) 26%, var(--fox-border));
}

.scoped-log-level-warning {
    color: var(--fox-warning);
    background: var(--fox-warning-soft);
    border-color: var(--fox-warning-soft);
}

.scoped-log-level-error {
    color: var(--fox-negative);
    background: var(--fox-negative-soft);
    border-color: var(--fox-event-sell-border);
}

:root {
    color-scheme: light;
    --fox-bg: #f8fafc;
    --fox-surface: #ffffff;
    --fox-surface-2: #fbfcfe;
    --fox-surface-3: #f3f7fc;
    --fox-nav-surface: linear-gradient(180deg, #fbfcfe 0%, #f3f7fc 100%);
    --fox-strip-surface: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
    --fox-strip-text: #334155;
    --fox-strip-chip: rgba(15, 23, 42, 0.05);
    --fox-strip-chip-strong: rgba(15, 23, 42, 0.08);
    --fox-border: #d8e1ec;
    --fox-border-strong: #a7b1c2;
    --fox-text: #111827;
    --fox-text-muted: #64748b;
    --fox-text-soft: #334155;
    --fox-link: #006bb7;
    --fox-selection-accent: #2563eb;
    --fox-selection-bg: rgba(37, 99, 235, 0.14);
    --fox-selection-border: rgba(37, 99, 235, 0.42);
    --fox-hover: #eef4ff;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #dbeafe;
    --fox-backdrop: rgba(0, 0, 0, 0.35);
    --fox-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.05);
    --fox-shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);

    --fox-primary: #2563eb;
    --fox-primary-soft: rgba(37, 99, 235, 0.12);
    --fox-accent: #f97316;
    --fox-accent-soft: rgba(249, 115, 22, 0.14);
    --fox-positive: #15803d;
    --fox-positive-soft: rgba(22, 163, 74, 0.14);
    --fox-negative: #dc2626;
    --fox-negative-soft: rgba(220, 38, 38, 0.14);
    --fox-warning: #d97706;
    --fox-warning-soft: rgba(217, 119, 6, 0.16);
    --fox-info: #0284c7;
    --fox-info-soft: rgba(2, 132, 199, 0.14);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(220, 38, 38, 0.35);

    --fox-chart-bg: var(--fox-surface);
    --fox-chart-grid: rgba(100, 116, 139, 0.24);
    --fox-chart-axis: var(--fox-text-muted);
    --fox-chart-crosshair: var(--fox-text-muted);
    --fox-chart-tooltip-bg: var(--fox-surface-2);
    --fox-chart-tooltip-text: var(--fox-text);
    --fox-candle-up: var(--fox-positive);
    --fox-candle-down: var(--fox-negative);
    --fox-volume-up: rgba(22, 163, 74, 0.45);
    --fox-volume-down: rgba(220, 38, 38, 0.45);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #2563eb;
    --fox-bep-line: #d97706;
    --fox-theoretical-line: #7c3aed;
    --fox-leg-line: #0ea5e9;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(22, 163, 74, 0.08);
    --fox-option-put-bg-soft: rgba(220, 38, 38, 0.08);
    --fox-option-call-bar: rgba(22, 163, 74, 0.65);
    --fox-option-put-bar: rgba(220, 38, 38, 0.65);
    --fox-option-itm-bg: rgba(217, 119, 6, 0.10);

    --fox-event-buy-bg: rgba(22, 163, 74, 0.12);
    --fox-event-sell-bg: rgba(220, 38, 38, 0.12);
    --fox-event-buy-border: rgba(22, 163, 74, 0.35);
    --fox-event-sell-border: rgba(220, 38, 38, 0.35);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(22, 163, 74, 0.12);
    --fox-heat-positive-2: rgba(22, 163, 74, 0.24);
    --fox-heat-positive-3: rgba(22, 163, 74, 0.38);
    --fox-heat-negative-1: rgba(220, 38, 38, 0.12);
    --fox-heat-negative-2: rgba(220, 38, 38, 0.24);
    --fox-heat-negative-3: rgba(220, 38, 38, 0.38);
    --fox-databar-positive: rgba(22, 163, 74, 0.55);
    --fox-databar-negative: rgba(220, 38, 38, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: var(--fox-surface);
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: var(--fox-border);
    --fox-overlay-bg: rgba(15, 23, 42, 0.45);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.18);
    --fox-focus-ring: rgba(37, 99, 235, 0.18);
    --fox-primary-border: rgba(37, 99, 235, 0.45);
    --fox-primary-hover-bg: rgba(37, 99, 235, 0.12);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(71, 85, 105, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #b91c1c;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

html.fox-theme-dark,
body.mud-theme-dark {
    color-scheme: dark;
    --fox-bg: #0b1220;
    --fox-surface: #111827;
    --fox-surface-2: #162033;
    --fox-surface-3: #1f2937;
    --fox-nav-surface: linear-gradient(90deg, #111827 0%, #1f2937 100%);
    --fox-strip-surface: linear-gradient(180deg, #09101d 0%, #111827 100%);
    --fox-strip-text: #e2e8f0;
    --fox-strip-chip: rgba(255, 255, 255, 0.10);
    --fox-strip-chip-strong: rgba(255, 255, 255, 0.14);
    --fox-border: rgba(148, 163, 184, 0.22);
    --fox-border-strong: rgba(148, 163, 184, 0.30);
    --fox-text: #e5e7eb;
    --fox-text-muted: #94a3b8;
    --fox-text-soft: #cbd5e1;
    --fox-link: #7cc4ff;
    --fox-selection-accent: #60a5fa;
    --fox-selection-bg: rgba(96, 165, 250, 0.16);
    --fox-selection-border: rgba(96, 165, 250, 0.44);
    --fox-hover: #1e293b;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #24344d;
    --fox-backdrop: rgba(0, 0, 0, 0.55);
    --fox-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
    --fox-shadow-md: 0 16px 36px rgba(0, 0, 0, 0.32);

    --fox-primary: #60a5fa;
    --fox-primary-soft: rgba(96, 165, 250, 0.16);
    --fox-accent: #f97316;
    --fox-accent-soft: rgba(249, 115, 22, 0.18);
    --fox-positive: #4ade80;
    --fox-positive-soft: rgba(74, 222, 128, 0.16);
    --fox-negative: #f87171;
    --fox-negative-soft: rgba(248, 113, 113, 0.16);
    --fox-warning: #fbbf24;
    --fox-warning-soft: rgba(251, 191, 36, 0.18);
    --fox-info: #38bdf8;
    --fox-info-soft: rgba(56, 189, 248, 0.16);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(248, 113, 113, 0.35);

    --fox-chart-bg: var(--fox-surface);
    --fox-chart-grid: rgba(214, 228, 249, 0.18);
    --fox-chart-axis: var(--fox-text-muted);
    --fox-chart-crosshair: var(--fox-text-muted);
    --fox-chart-tooltip-bg: var(--fox-surface-2);
    --fox-chart-tooltip-text: var(--fox-text);
    --fox-candle-up: var(--fox-positive);
    --fox-candle-down: var(--fox-negative);
    --fox-volume-up: rgba(74, 222, 128, 0.42);
    --fox-volume-down: rgba(248, 113, 113, 0.42);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #93c5fd;
    --fox-bep-line: #fbbf24;
    --fox-theoretical-line: #c4b5fd;
    --fox-leg-line: #38bdf8;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(74, 222, 128, 0.10);
    --fox-option-put-bg-soft: rgba(248, 113, 113, 0.10);
    --fox-option-call-bar: rgba(74, 222, 128, 0.62);
    --fox-option-put-bar: rgba(248, 113, 113, 0.62);
    --fox-option-itm-bg: rgba(217, 119, 6, 0.10);

    --fox-event-buy-bg: rgba(74, 222, 128, 0.14);
    --fox-event-sell-bg: rgba(248, 113, 113, 0.14);
    --fox-event-buy-border: rgba(74, 222, 128, 0.35);
    --fox-event-sell-border: rgba(248, 113, 113, 0.35);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(22, 163, 74, 0.12);
    --fox-heat-positive-2: rgba(22, 163, 74, 0.24);
    --fox-heat-positive-3: rgba(22, 163, 74, 0.38);
    --fox-heat-negative-1: rgba(220, 38, 38, 0.12);
    --fox-heat-negative-2: rgba(220, 38, 38, 0.24);
    --fox-heat-negative-3: rgba(220, 38, 38, 0.38);
    --fox-databar-positive: rgba(22, 163, 74, 0.55);
    --fox-databar-negative: rgba(220, 38, 38, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: var(--fox-surface);
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: var(--fox-border);
    --fox-overlay-bg: rgba(0, 0, 0, 0.55);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.32);
    --fox-focus-ring: rgba(96, 165, 250, 0.28);
    --fox-primary-border: rgba(96, 165, 250, 0.42);
    --fox-primary-hover-bg: rgba(96, 165, 250, 0.16);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(226, 232, 240, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #fecaca;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

html.fox-theme-brown,
body.fox-theme-brown {
    color-scheme: dark;
    --fox-bg: #0D0A07;
    --fox-surface: #261D15;
    --fox-surface-2: #403123;
    --fox-surface-3: #594531;
    --fox-nav-surface: linear-gradient(90deg, #261D15 0%, #403123 100%);
    --fox-strip-surface: linear-gradient(180deg, #0D0A07 0%, #261D15 100%);
    --fox-strip-text: #BFBFBF;
    --fox-strip-chip: rgba(255, 255, 255, 0.10);
    --fox-strip-chip-strong: rgba(255, 255, 255, 0.14);
    --fox-border: #73583F;
    --fox-border-strong: #8C6B4D;
    --fox-text: #F2F2F2;
    --fox-text-muted: #8C8C8C;
    --fox-text-soft: #BFBFBF;
    --fox-link: #D9904D;
    --fox-selection-accent: #D9904D;
    --fox-selection-bg: rgba(217, 144, 77, 0.18);
    --fox-selection-border: rgba(217, 144, 77, 0.46);
    --fox-hover: #403123;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #594531;
    --fox-backdrop: rgba(0, 0, 0, 0.55);
    --fox-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
    --fox-shadow-md: 0 16px 36px rgba(0, 0, 0, 0.32);

    --fox-primary: #CC7E33;
    --fox-primary-soft: rgba(204, 126, 51, 0.18);
    --fox-accent: #f97316;
    --fox-accent-soft: rgba(249, 115, 22, 0.18);
    --fox-positive: #139113;
    --fox-positive-soft: rgba(19, 145, 19, 0.16);
    --fox-negative: #BD3719;
    --fox-negative-soft: rgba(189, 55, 25, 0.16);
    --fox-warning: #E5C522;
    --fox-warning-soft: rgba(229, 197, 34, 0.18);
    --fox-info: #4DA3FF;
    --fox-info-soft: rgba(77, 163, 255, 0.16);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(189, 55, 25, 0.38);

    --fox-chart-bg: #0D0A07;
    --fox-chart-grid: rgba(242, 242, 242, 0.12);
    --fox-chart-axis: #8C8C8C;
    --fox-chart-crosshair: var(--fox-chart-axis);
    --fox-chart-tooltip-bg: #261D15;
    --fox-chart-tooltip-text: #F2F2F2;
    --fox-candle-up: #139113;
    --fox-candle-down: #BD3719;
    --fox-volume-up: rgba(19, 145, 19, 0.42);
    --fox-volume-down: rgba(189, 55, 25, 0.42);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #D9904D;
    --fox-bep-line: #E5C522;
    --fox-theoretical-line: #c4b5fd;
    --fox-leg-line: #4DA3FF;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(19, 145, 19, 0.10);
    --fox-option-put-bg-soft: rgba(189, 55, 25, 0.10);
    --fox-option-call-bar: rgba(19, 145, 19, 0.62);
    --fox-option-put-bar: rgba(189, 55, 25, 0.62);
    --fox-option-itm-bg: rgba(229, 197, 34, 0.12);

    --fox-event-buy-bg: rgba(19, 145, 19, 0.18);
    --fox-event-sell-bg: rgba(189, 55, 25, 0.18);
    --fox-event-buy-border: rgba(19, 145, 19, 0.36);
    --fox-event-sell-border: rgba(189, 55, 25, 0.36);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(19, 145, 19, 0.12);
    --fox-heat-positive-2: rgba(19, 145, 19, 0.24);
    --fox-heat-positive-3: rgba(19, 145, 19, 0.38);
    --fox-heat-negative-1: rgba(189, 55, 25, 0.12);
    --fox-heat-negative-2: rgba(189, 55, 25, 0.24);
    --fox-heat-negative-3: rgba(189, 55, 25, 0.38);
    --fox-databar-positive: rgba(19, 145, 19, 0.55);
    --fox-databar-negative: rgba(189, 55, 25, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: #261D15;
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: #73583F;
    --fox-overlay-bg: rgba(0, 0, 0, 0.55);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.32);
    --fox-focus-ring: rgba(204, 126, 51, 0.28);
    --fox-primary-border: rgba(204, 126, 51, 0.44);
    --fox-primary-hover-bg: rgba(204, 126, 51, 0.16);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(226, 232, 240, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #fecaca;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

html.fox-theme-blue,
body.fox-theme-blue {
    color-scheme: dark;
    --fox-bg: #03090F;
    --fox-surface: #0A1F33;
    --fox-surface-2: #113659;
    --fox-surface-3: #1A4F80;
    --fox-nav-surface: linear-gradient(90deg, #0A1F33 0%, #113659 100%);
    --fox-strip-surface: linear-gradient(180deg, #03090F 0%, #0A1F33 100%);
    --fox-strip-text: #BFD7F2;
    --fox-strip-chip: rgba(255, 255, 255, 0.10);
    --fox-strip-chip-strong: rgba(255, 255, 255, 0.14);
    --fox-border: #466280;
    --fox-border-strong: #5D7FA6;
    --fox-text: #F2F2F2;
    --fox-text-muted: #8C8C8C;
    --fox-text-soft: #BFD7F2;
    --fox-link: #4DA3FF;
    --fox-selection-accent: #4DA3FF;
    --fox-selection-bg: rgba(77, 163, 255, 0.18);
    --fox-selection-border: rgba(77, 163, 255, 0.48);
    --fox-hover: #113659;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #1A4F80;
    --fox-backdrop: rgba(0, 0, 0, 0.55);
    --fox-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
    --fox-shadow-md: 0 16px 36px rgba(0, 0, 0, 0.32);

    --fox-primary: #4DA3FF;
    --fox-primary-soft: rgba(77, 163, 255, 0.18);
    --fox-accent: #f97316;
    --fox-accent-soft: rgba(249, 115, 22, 0.18);
    --fox-positive: #139113;
    --fox-positive-soft: rgba(19, 145, 19, 0.16);
    --fox-negative: #BD3719;
    --fox-negative-soft: rgba(189, 55, 25, 0.16);
    --fox-warning: #E5C522;
    --fox-warning-soft: rgba(229, 197, 34, 0.18);
    --fox-info: #4DA3FF;
    --fox-info-soft: rgba(77, 163, 255, 0.16);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(189, 55, 25, 0.38);

    --fox-chart-bg: #03090F;
    --fox-chart-grid: rgba(242, 242, 242, 0.12);
    --fox-chart-axis: #8C8C8C;
    --fox-chart-crosshair: var(--fox-chart-axis);
    --fox-chart-tooltip-bg: #0A1F33;
    --fox-chart-tooltip-text: #F2F2F2;
    --fox-candle-up: #139113;
    --fox-candle-down: #BD3719;
    --fox-volume-up: rgba(19, 145, 19, 0.42);
    --fox-volume-down: rgba(189, 55, 25, 0.42);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #4DA3FF;
    --fox-bep-line: #E5C522;
    --fox-theoretical-line: #c4b5fd;
    --fox-leg-line: #4DA3FF;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(19, 145, 19, 0.10);
    --fox-option-put-bg-soft: rgba(189, 55, 25, 0.10);
    --fox-option-call-bar: rgba(19, 145, 19, 0.62);
    --fox-option-put-bar: rgba(189, 55, 25, 0.62);
    --fox-option-itm-bg: rgba(229, 197, 34, 0.12);

    --fox-event-buy-bg: rgba(19, 145, 19, 0.18);
    --fox-event-sell-bg: rgba(189, 55, 25, 0.18);
    --fox-event-buy-border: rgba(19, 145, 19, 0.36);
    --fox-event-sell-border: rgba(189, 55, 25, 0.36);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(19, 145, 19, 0.12);
    --fox-heat-positive-2: rgba(19, 145, 19, 0.24);
    --fox-heat-positive-3: rgba(19, 145, 19, 0.38);
    --fox-heat-negative-1: rgba(189, 55, 25, 0.12);
    --fox-heat-negative-2: rgba(189, 55, 25, 0.24);
    --fox-heat-negative-3: rgba(189, 55, 25, 0.38);
    --fox-databar-positive: rgba(19, 145, 19, 0.55);
    --fox-databar-negative: rgba(189, 55, 25, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: #0A1F33;
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: #466280;
    --fox-overlay-bg: rgba(0, 0, 0, 0.55);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.32);
    --fox-focus-ring: rgba(204, 126, 51, 0.28);
    --fox-primary-border: rgba(77, 163, 255, 0.44);
    --fox-primary-hover-bg: rgba(77, 163, 255, 0.16);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(226, 232, 240, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #fecaca;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

html.fox-theme-white,
body.fox-theme-white {
    color-scheme: light;
    --fox-bg: #F2F2F2;
    --fox-surface: #FFFFFF;
    --fox-surface-2: #D9D9D9;
    --fox-surface-3: #BFBFBF;
    --fox-nav-surface: linear-gradient(90deg, #FFFFFF 0%, #D9D9D9 100%);
    --fox-strip-surface: linear-gradient(180deg, #F2F2F2 0%, #FFFFFF 100%);
    --fox-strip-text: #404040;
    --fox-strip-chip: rgba(13, 13, 13, 0.05);
    --fox-strip-chip-strong: rgba(13, 13, 13, 0.08);
    --fox-border: #BFBFBF;
    --fox-border-strong: #737373;
    --fox-text: #0D0D0D;
    --fox-text-muted: #737373;
    --fox-text-soft: #404040;
    --fox-link: #CC5404;
    --fox-selection-accent: #CC5404;
    --fox-selection-bg: rgba(204, 84, 4, 0.13);
    --fox-selection-border: rgba(204, 84, 4, 0.36);
    --fox-hover: #E6E6E6;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #D0D0D0;
    --fox-backdrop: rgba(0, 0, 0, 0.35);
    --fox-shadow-sm: 0 6px 18px rgba(13, 13, 13, 0.06);
    --fox-shadow-md: 0 12px 28px rgba(13, 13, 13, 0.10);

    --fox-primary: #CC5404;
    --fox-primary-soft: rgba(204, 84, 4, 0.12);
    --fox-accent: #CC5404;
    --fox-accent-soft: rgba(204, 84, 4, 0.14);
    --fox-positive: #0FBB0F;
    --fox-positive-soft: rgba(15, 187, 15, 0.14);
    --fox-negative: #E00B0B;
    --fox-negative-soft: rgba(224, 11, 11, 0.14);
    --fox-warning: #C9A900;
    --fox-warning-soft: rgba(201, 169, 0, 0.16);
    --fox-info: #006FD6;
    --fox-info-soft: rgba(0, 111, 214, 0.14);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(224, 11, 11, 0.35);

    --fox-chart-bg: #F2F2F2;
    --fox-chart-grid: rgba(13, 13, 13, 0.14);
    --fox-chart-axis: #737373;
    --fox-chart-crosshair: var(--fox-chart-axis);
    --fox-chart-tooltip-bg: #FFFFFF;
    --fox-chart-tooltip-text: #0D0D0D;
    --fox-candle-up: #0FBB0F;
    --fox-candle-down: #E00B0B;
    --fox-volume-up: rgba(15, 187, 15, 0.42);
    --fox-volume-down: rgba(224, 11, 11, 0.42);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #CC5404;
    --fox-bep-line: #C9A900;
    --fox-theoretical-line: #7c3aed;
    --fox-leg-line: #006FD6;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(15, 187, 15, 0.08);
    --fox-option-put-bg-soft: rgba(224, 11, 11, 0.08);
    --fox-option-call-bar: rgba(15, 187, 15, 0.60);
    --fox-option-put-bar: rgba(224, 11, 11, 0.60);
    --fox-option-itm-bg: rgba(201, 169, 0, 0.12);

    --fox-event-buy-bg: rgba(15, 187, 15, 0.14);
    --fox-event-sell-bg: rgba(224, 11, 11, 0.14);
    --fox-event-buy-border: rgba(15, 187, 15, 0.36);
    --fox-event-sell-border: rgba(224, 11, 11, 0.36);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(15, 187, 15, 0.12);
    --fox-heat-positive-2: rgba(15, 187, 15, 0.24);
    --fox-heat-positive-3: rgba(15, 187, 15, 0.38);
    --fox-heat-negative-1: rgba(224, 11, 11, 0.12);
    --fox-heat-negative-2: rgba(224, 11, 11, 0.24);
    --fox-heat-negative-3: rgba(224, 11, 11, 0.38);
    --fox-databar-positive: rgba(15, 187, 15, 0.55);
    --fox-databar-negative: rgba(224, 11, 11, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: #FFFFFF;
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: #BFBFBF;
    --fox-overlay-bg: rgba(13, 13, 13, 0.38);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(13, 13, 13, 0.18);
    --fox-focus-ring: rgba(204, 84, 4, 0.20);
    --fox-primary-border: rgba(204, 84, 4, 0.42);
    --fox-primary-hover-bg: rgba(204, 84, 4, 0.12);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(64, 64, 64, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #B00000;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

html.fox-theme-green,
body.fox-theme-green {
    color-scheme: dark;
    --fox-bg: #050D09;
    --fox-surface: #0F261B;
    --fox-surface-2: #1A402D;
    --fox-surface-3: #24593F;
    --fox-nav-surface: linear-gradient(90deg, #0F261B 0%, #1A402D 100%);
    --fox-strip-surface: linear-gradient(180deg, #050D09 0%, #0F261B 100%);
    --fox-strip-text: #BFE0CF;
    --fox-strip-chip: rgba(255, 255, 255, 0.10);
    --fox-strip-chip-strong: rgba(255, 255, 255, 0.14);
    --fox-border: #3F7359;
    --fox-border-strong: #5A8C70;
    --fox-text: #F2F2F2;
    --fox-text-muted: #8C8C8C;
    --fox-text-soft: #BFE0CF;
    --fox-link: #4ade80;
    --fox-selection-accent: #22c55e;
    --fox-selection-bg: rgba(34, 197, 94, 0.18);
    --fox-selection-border: rgba(34, 197, 94, 0.48);
    --fox-hover: #1A402D;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #24593F;
    --fox-backdrop: rgba(0, 0, 0, 0.55);
    --fox-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
    --fox-shadow-md: 0 16px 36px rgba(0, 0, 0, 0.32);

    --fox-primary: #22c55e;
    --fox-primary-soft: rgba(34, 197, 94, 0.18);
    --fox-accent: #f97316;
    --fox-accent-soft: rgba(249, 115, 22, 0.18);
    --fox-positive: #139113;
    --fox-positive-soft: rgba(19, 145, 19, 0.16);
    --fox-negative: #BD3719;
    --fox-negative-soft: rgba(189, 55, 25, 0.16);
    --fox-warning: #E5C522;
    --fox-warning-soft: rgba(229, 197, 34, 0.18);
    --fox-info: #4DA3FF;
    --fox-info-soft: rgba(77, 163, 255, 0.16);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(189, 55, 25, 0.38);

    --fox-chart-bg: #050D09;
    --fox-chart-grid: rgba(242, 242, 242, 0.12);
    --fox-chart-axis: #8C8C8C;
    --fox-chart-crosshair: var(--fox-chart-axis);
    --fox-chart-tooltip-bg: #0F261B;
    --fox-chart-tooltip-text: #F2F2F2;
    --fox-candle-up: #139113;
    --fox-candle-down: #BD3719;
    --fox-volume-up: rgba(19, 145, 19, 0.42);
    --fox-volume-down: rgba(189, 55, 25, 0.42);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #22c55e;
    --fox-bep-line: #E5C522;
    --fox-theoretical-line: #c4b5fd;
    --fox-leg-line: #4DA3FF;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(19, 145, 19, 0.10);
    --fox-option-put-bg-soft: rgba(189, 55, 25, 0.10);
    --fox-option-call-bar: rgba(19, 145, 19, 0.62);
    --fox-option-put-bar: rgba(189, 55, 25, 0.62);
    --fox-option-itm-bg: rgba(229, 197, 34, 0.12);

    --fox-event-buy-bg: rgba(19, 145, 19, 0.18);
    --fox-event-sell-bg: rgba(189, 55, 25, 0.18);
    --fox-event-buy-border: rgba(19, 145, 19, 0.36);
    --fox-event-sell-border: rgba(189, 55, 25, 0.36);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(19, 145, 19, 0.12);
    --fox-heat-positive-2: rgba(19, 145, 19, 0.24);
    --fox-heat-positive-3: rgba(19, 145, 19, 0.38);
    --fox-heat-negative-1: rgba(189, 55, 25, 0.12);
    --fox-heat-negative-2: rgba(189, 55, 25, 0.24);
    --fox-heat-negative-3: rgba(189, 55, 25, 0.38);
    --fox-databar-positive: rgba(19, 145, 19, 0.55);
    --fox-databar-negative: rgba(189, 55, 25, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: #0F261B;
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: #3F7359;
    --fox-overlay-bg: rgba(0, 0, 0, 0.55);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.32);
    --fox-focus-ring: rgba(204, 126, 51, 0.28);
    --fox-primary-border: rgba(34, 197, 94, 0.44);
    --fox-primary-hover-bg: rgba(34, 197, 94, 0.16);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(226, 232, 240, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #fecaca;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

html.fox-theme-black,
body.fox-theme-black {
    color-scheme: dark;
    --fox-bg: #0D0D0D;
    --fox-surface: #262626;
    --fox-surface-2: #404040;
    --fox-surface-3: #595959;
    --fox-nav-surface: linear-gradient(90deg, #262626 0%, #404040 100%);
    --fox-strip-surface: linear-gradient(180deg, #0D0D0D 0%, #262626 100%);
    --fox-strip-text: #BFBFBF;
    --fox-strip-chip: rgba(255, 255, 255, 0.10);
    --fox-strip-chip-strong: rgba(255, 255, 255, 0.14);
    --fox-border: #737373;
    --fox-border-strong: #8C8C8C;
    --fox-text: #F2F2F2;
    --fox-text-muted: #8C8C8C;
    --fox-text-soft: #BFBFBF;
    --fox-link: #d4d4d4;
    --fox-selection-accent: #a3a3a3;
    --fox-selection-bg: rgba(163, 163, 163, 0.18);
    --fox-selection-border: rgba(163, 163, 163, 0.48);
    --fox-hover: #404040;
    --fox-hover-strong: var(--fox-surface-3);
    --fox-control-bg: var(--fox-surface);
    --fox-control-hover-bg: var(--fox-surface-2);
    --fox-control-active-bg: var(--fox-surface-3);
    --fox-control-border: var(--fox-border);
    --fox-control-hover-border: var(--fox-border-strong);
    --fox-control-text: var(--fox-text);
    --fox-active: #595959;
    --fox-backdrop: rgba(0, 0, 0, 0.55);
    --fox-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
    --fox-shadow-md: 0 16px 36px rgba(0, 0, 0, 0.32);

    --fox-primary: #a3a3a3;
    --fox-primary-soft: rgba(163, 163, 163, 0.18);
    --fox-accent: #f97316;
    --fox-accent-soft: rgba(249, 115, 22, 0.18);
    --fox-positive: #139113;
    --fox-positive-soft: rgba(19, 145, 19, 0.16);
    --fox-negative: #BD3719;
    --fox-negative-soft: rgba(189, 55, 25, 0.16);
    --fox-warning: #E5C522;
    --fox-warning-soft: rgba(229, 197, 34, 0.18);
    --fox-info: #4DA3FF;
    --fox-info-soft: rgba(77, 163, 255, 0.16);
    --fox-danger: var(--fox-negative);
    --fox-danger-soft: var(--fox-negative-soft);
    --fox-danger-border: rgba(189, 55, 25, 0.38);

    --fox-chart-bg: #0D0D0D;
    --fox-chart-grid: rgba(242, 242, 242, 0.12);
    --fox-chart-axis: #8C8C8C;
    --fox-chart-crosshair: var(--fox-chart-axis);
    --fox-chart-tooltip-bg: #262626;
    --fox-chart-tooltip-text: #F2F2F2;
    --fox-candle-up: #139113;
    --fox-candle-down: #BD3719;
    --fox-volume-up: rgba(19, 145, 19, 0.42);
    --fox-volume-down: rgba(189, 55, 25, 0.42);
    --fox-line-series: var(--fox-primary);
    --fox-underlying-line: #d4d4d4;
    --fox-bep-line: #E5C522;
    --fox-theoretical-line: #c4b5fd;
    --fox-leg-line: #4DA3FF;

    --fox-option-strike-bg: var(--fox-surface-2);
    --fox-option-strike-bg-atm: var(--fox-warning-soft);
    --fox-option-strike-text: var(--fox-text);
    --fox-option-pcr-bg: var(--fox-surface-3);
    --fox-option-pcr-text: var(--fox-text);
    --fox-option-call-bg-soft: rgba(19, 145, 19, 0.10);
    --fox-option-put-bg-soft: rgba(189, 55, 25, 0.10);
    --fox-option-call-bar: rgba(19, 145, 19, 0.62);
    --fox-option-put-bar: rgba(189, 55, 25, 0.62);
    --fox-option-itm-bg: rgba(229, 197, 34, 0.12);

    --fox-event-buy-bg: rgba(19, 145, 19, 0.18);
    --fox-event-sell-bg: rgba(189, 55, 25, 0.18);
    --fox-event-buy-border: rgba(19, 145, 19, 0.36);
    --fox-event-sell-border: rgba(189, 55, 25, 0.36);
    --fox-watch-row-hover: var(--fox-hover);
    --fox-watch-row-selected: var(--fox-active);

    --fox-heat-positive-1: rgba(19, 145, 19, 0.12);
    --fox-heat-positive-2: rgba(19, 145, 19, 0.24);
    --fox-heat-positive-3: rgba(19, 145, 19, 0.38);
    --fox-heat-negative-1: rgba(189, 55, 25, 0.12);
    --fox-heat-negative-2: rgba(189, 55, 25, 0.24);
    --fox-heat-negative-3: rgba(189, 55, 25, 0.38);
    --fox-databar-positive: rgba(19, 145, 19, 0.55);
    --fox-databar-negative: rgba(189, 55, 25, 0.55);
    --fox-databar-zero-line: var(--fox-border-strong);
    --fox-heat-neutral: var(--fox-surface-2);
    --fox-heat-neutral-border: var(--fox-border);
    --fox-heat-positive-text: var(--fox-positive);
    --fox-heat-negative-text: var(--fox-negative);
    --fox-sector-bar-positive: var(--fox-databar-positive);
    --fox-sector-bar-negative: var(--fox-databar-negative);
    --fox-sector-zero-line: var(--fox-databar-zero-line);

    --fox-dialog-bg: #262626;
    --fox-dialog-header-bg: var(--fox-surface-2);
    --fox-dialog-border: #737373;
    --fox-overlay-bg: rgba(0, 0, 0, 0.55);
    --fox-input-bg: var(--fox-surface);
    --fox-input-border: var(--fox-border);
    --fox-input-text: var(--fox-text);
    --fox-input-placeholder: var(--fox-text-muted);
    --fox-list-item-bg: var(--fox-surface);
    --fox-list-item-hover: var(--fox-hover);
    --fox-list-item-selected: var(--fox-active);
    --fox-list-item-border: var(--fox-border);
    --fox-popup-bg: var(--fox-dialog-bg);
    --fox-popup-border: var(--fox-dialog-border);
    --fox-popup-shadow: var(--fox-shadow-md);
    --fox-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.32);
    --fox-focus-ring: rgba(204, 126, 51, 0.28);
    --fox-primary-border: rgba(163, 163, 163, 0.44);
    --fox-primary-hover-bg: rgba(163, 163, 163, 0.16);
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
    --fox-select-caret: rgba(226, 232, 240, 0.75);
    --fox-nav-text: rgba(255, 255, 255, 0.94);
    --fox-nav-text-strong: rgba(255, 255, 255, 0.96);
    --fox-nav-text-muted: rgba(255, 255, 255, 0.78);
    --fox-nav-chip-bg: rgba(255, 255, 255, 0.08);
    --fox-nav-chip-hover: rgba(255, 255, 255, 0.14);
    --fox-nav-chip-border: rgba(255, 255, 255, 0.24);
    --fox-danger-text-soft: #fecaca;

    --fox-table-bg: var(--fox-surface);
    --fox-table-header-bg: var(--fox-surface-2);
    --fox-table-header-text: var(--fox-text);
    --fox-table-row-bg: var(--fox-surface);
    --fox-table-row-alt-bg: var(--fox-surface-2);
    --fox-table-row-hover: var(--fox-hover);
    --fox-table-row-selected: var(--fox-active);
    --fox-table-border: var(--fox-border);
    --fox-table-muted-text: var(--fox-text-muted);

    --fox-drawing-default: var(--fox-primary);
    --fox-drawing-handle-fill: var(--fox-surface);
    --fox-drawing-handle-border: var(--fox-primary);
    --fox-drawing-popup-bg: var(--fox-surface-2);
    --fox-drawing-popup-text: var(--fox-text);
    --fox-drawing-popup-border: var(--fox-border);
    --fox-scichart-bg: var(--fox-chart-bg);
    --fox-scichart-grid: var(--fox-chart-grid);
    --fox-scichart-axis: var(--fox-chart-axis);
    --fox-scichart-candle-up: var(--fox-candle-up);
    --fox-scichart-candle-down: var(--fox-candle-down);

    --fox-payoff-zero-line: var(--fox-chart-axis);
    --fox-payoff-profit-area: var(--fox-positive-soft);
    --fox-payoff-loss-area: var(--fox-negative-soft);
    --fox-payoff-bep-line: var(--fox-bep-line);
    --fox-payoff-underlying-line: var(--fox-underlying-line);
    --fox-payoff-theoretical-line: var(--fox-theoretical-line);
    --fox-payoff-leg-line: var(--fox-leg-line);
    --fox-payoff-call-oi-bar: var(--fox-option-call-bar);
    --fox-payoff-put-oi-bar: var(--fox-option-put-bar);

    --fox-study-color-1: #2962ff;
    --fox-study-color-2: #d81b60;
    --fox-study-color-3: #00897b;
    --fox-study-color-4: #f9a825;
    --fox-study-color-5: #8e24aa;
    --fox-study-color-6: #ef6c00;
    --fox-study-color-7: #00acc1;
    --fox-study-color-8: #5e35b1;
}

/* FoxReports semantic theme utilities */
.fox-bg { background: var(--fox-bg) !important; }
.fox-surface { background: var(--fox-surface) !important; }
.fox-surface-2 { background: var(--fox-surface-2) !important; }
.fox-border { border-color: var(--fox-border) !important; }
.fox-text { color: var(--fox-text) !important; }
.fox-muted, .fox-muted-text { color: var(--fox-text-muted) !important; }
.fox-positive, .fox-positive-text { color: var(--fox-positive) !important; }
.fox-negative, .fox-negative-text { color: var(--fox-negative) !important; }
.fox-warning, .fox-warning-text { color: var(--fox-warning) !important; }
.fox-positive-bg, .fox-positive-soft-bg { background: var(--fox-positive-soft) !important; }
.fox-negative-bg, .fox-negative-soft-bg { background: var(--fox-negative-soft) !important; }
.fox-warning-bg, .fox-warning-soft-bg { background: var(--fox-warning-soft) !important; }
.fox-table-bg { background: var(--fox-table-bg) !important; }
.fox-table-header-bg { background: var(--fox-table-header-bg) !important; }
.fox-hover-bg { background: var(--fox-hover) !important; }
.fox-active-bg { background: var(--fox-active) !important; }


html, body {
    background: var(--fox-bg);
    color: var(--fox-text);
}

a, .btn-link {
    color: var(--fox-link);
}

.rfd-backdrop {
    background: var(--fox-backdrop);
}

.rfd-modal,
.fr-group,
.top-nav-shell__account-dropdown,
.top-nav-shell__account-menu,
.top-nav-shell__account-summary,
.top-nav-shell__account-dropdown,
.top-nav-shell__dropdown-button,
.top-nav-shell__menu-panel,
.top-nav-shell__mobile-panel,
.trading-workspace__sidebar,
.trading-workspace__main {
    color: var(--fox-text);
}

.rfd-modal {
    background: var(--fox-surface);
    box-shadow: var(--fox-shadow-md);
}

.rfd-header,
.rfd-footer,
.rfd-row {
    border-color: var(--fox-border);
}

.rfd-label,
.top-nav-shell__dropdown-button,
.trading-report-toolbar__field label,
.trading-report-state {
    color: var(--fox-text-muted);
}

.report-menu-search,
.report-menu-search .form-control,
.fr-group,
.fr-group-toggle,
.fr-section-toggle,
.fr-section-body,
.fr-section-body-noheader,
.fr-report-item,
.top-nav-shell__menu-panel,
.top-nav-shell__account-dropdown,
.trading-workspace__search-input-wrap,
.trading-workspace__search-results,
.trading-workspace__instrument-card,
.trading-workspace__watch-state {
    background: var(--fox-surface);
    color: var(--fox-text);
    border-color: var(--fox-border);
}

.report-menu-search {
    background: var(--fox-surface-2);
    box-shadow: 0 6px 10px -10px var(--fox-border-strong);
}

.report-menu-search .form-control {
    background: var(--fox-surface);
    color: var(--fox-text);
    border-color: var(--fox-border);
}

.fr-group-toggle {
    background: var(--fox-surface-2);
    color: var(--fox-text-soft);
    border-bottom-color: var(--fox-border);
}

.fr-section-toggle,
.fr-chevron,
.fr-group-toggle.is-open .fr-chevron,
.fr-section-toggle.is-open .fr-chevron,
.fr-report-item,
.trading-workspace__search-result-meta,
.trading-workspace__watch-state,
.trading-workspace__instrument-meta,
.workspace-pane__item-bottom {
    color: var(--fox-text-muted);
}

.fr-group-toggle:hover,
.fr-report-item:hover,
.top-nav-shell__dropdown-button:hover {
    background: var(--fox-hover);
}

.fr-report-item.active {
    background: color-mix(in srgb, var(--fox-link) 14%, var(--fox-surface));
    color: var(--fox-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fox-link) 30%, var(--fox-border));
}

.qg-scroll :deep(thead th),
.qg-scroll :deep(thead th[aria-sort]) {
    background: var(--fox-surface-2);
    color: var(--fox-text);
    box-shadow: inset 0 -1px 0 var(--fox-border-strong);
}

.scoped-logs-table-wrap,
.periodchart-searchdialog,
.periodchart-searchdialog__body,
.periodchart-searchdialog__result,
.periodchart-topbar,
.periodchart-workspace,
.periodchart-surface,
.periodchart-settings-panel {
    color: var(--fox-text);
}


/* --- Theme completion overrides --- */
.report-menu-search {
    background: var(--fox-surface-2);
    box-shadow: 0 6px 10px -10px var(--fox-border-strong);
}
.report-menu-search .form-control {
    border: 1px solid var(--fox-border);
    background: var(--fox-surface);
    color: var(--fox-text);
}
.report-menu-search .form-control::placeholder { color: var(--fox-text-muted); }
.report-menu-search .form-control:focus {
    border-color: color-mix(in srgb, var(--fox-link) 30%, var(--fox-border));
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--fox-link) 12%, transparent);
}
.fr-group {
    border-color: var(--fox-border);
    background: var(--fox-surface);
    box-shadow: var(--fox-shadow-sm);
}
.fr-group-toggle {
    background: var(--fox-surface-2);
    color: var(--fox-text-soft);
    border-bottom: 1px solid var(--fox-border);
}
.fr-section-toggle {
    background: var(--fox-surface);
    color: var(--fox-text-muted);
}
.fr-section-body,
.fr-section-body-noheader,
.fr-report-item {
    background: var(--fox-surface);
}
.fr-chevron { color: var(--fox-text-muted); }
.fr-group-toggle.is-open .fr-chevron,
.fr-section-toggle.is-open .fr-chevron,
.fr-group-toggle:hover .fr-chevron,
.fr-section-toggle:hover .fr-chevron { color: var(--fox-text-soft); }
.fr-report-item {
    color: var(--fox-text-soft);
    box-shadow: none;
}
.fr-group-toggle:hover,
.fr-report-item:hover,
.top-nav-shell__dropdown-button:hover,
.top-nav-shell__account-summary:hover {
    background: var(--fox-hover);
}
.top-nav-shell__account-dropdown {
    background: var(--fox-surface);
    border: 1px solid var(--fox-border);
    box-shadow: var(--fox-shadow-md);
}
.top-nav-shell__dropdown-button { color: var(--fox-text); }
.trading-report-toolbar__field label,
.trading-report-state { color: var(--fox-text-muted); }
.scoped-logs-table-wrap {
    border: 1px solid var(--fox-border);
    background: var(--fox-surface);
}
.scoped-logs-table thead th,
.scoped-logs-table thead .scoped-log-filter-row th {
    background: var(--fox-surface);
    color: var(--fox-text);
}


.scoped-logs-page h4,
.scoped-logs-page .small,
.scoped-logs-page .text-muted {
    color: var(--fox-text) !important;
}

.scoped-logs-page .text-muted,
.scoped-logs-page .small.text-muted {
    color: var(--fox-text-muted) !important;
}

.scoped-logs-page .btn-outline-secondary,
.scoped-logs-page .btn-outline-primary {
    color: var(--fox-text);
    border-color: var(--fox-border);
    background: transparent;
}

.scoped-logs-page .btn-outline-secondary:hover,
.scoped-logs-page .btn-outline-primary:hover {
    color: var(--fox-text);
    background: var(--fox-hover);
    border-color: var(--fox-border-strong);
}

.scoped-logs-table {
    margin-bottom: 0;
    color: var(--fox-text);
    --bs-table-color: var(--fox-text);
    --bs-table-bg: var(--fox-surface);
    --bs-table-border-color: var(--fox-border);
    --bs-table-striped-color: var(--fox-text);
    --bs-table-striped-bg: color-mix(in srgb, var(--fox-surface-2) 82%, transparent);
    --bs-table-hover-color: var(--fox-text);
    --bs-table-hover-bg: color-mix(in srgb, var(--fox-hover) 100%, transparent);
}

.scoped-logs-table tbody td {
    color: var(--fox-text);
    border-color: var(--fox-border);
    background: transparent;
}

.scoped-logs-table thead input,
.scoped-logs-table thead select,
.scoped-logs-page .form-control,
.scoped-logs-page .form-select {
    background: var(--fox-surface-2);
    color: var(--fox-text);
    border: 1px solid var(--fox-border);
}

.scoped-logs-table thead input::placeholder,
.scoped-logs-page .form-control::placeholder {
    color: var(--fox-text-muted);
    opacity: 1;
}

.scoped-logs-table thead input:focus,
.scoped-logs-table thead select:focus,
.scoped-logs-page .form-control:focus,
.scoped-logs-page .form-select:focus {
    background: var(--fox-surface-2);
    color: var(--fox-text);
    border-color: color-mix(in srgb, var(--fox-link) 35%, var(--fox-border));
    box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--fox-link) 16%, transparent);
}

.scoped-logs-page .alert-light {
    background: var(--fox-surface);
    color: var(--fox-text);
    border-color: var(--fox-border);
}

.scoped-logs-page summary,
.scoped-logs-page pre {
    color: var(--fox-text);
}


/* --- Trading reports theme completion --- */
.trading-report-page .alert,
.trading-embedded .alert {
    --bs-alert-bg: color-mix(in srgb, var(--fox-surface-2) 88%, transparent);
    --bs-alert-color: var(--fox-text);
    --bs-alert-border-color: var(--fox-border);
    background: var(--bs-alert-bg);
    color: var(--bs-alert-color);
    border-color: var(--bs-alert-border-color);
}

.trading-report-page .alert-info,
.trading-embedded .alert-info {
    --bs-alert-bg: color-mix(in srgb, var(--fox-link) 10%, var(--fox-surface));
    --bs-alert-color: var(--fox-text);
    --bs-alert-border-color: color-mix(in srgb, var(--fox-link) 20%, var(--fox-border));
}

.trading-report-page .alert-warning,
.trading-embedded .alert-warning {
    --bs-alert-bg: color-mix(in srgb, #f59e0b 12%, var(--fox-surface));
    --bs-alert-color: var(--fox-text);
    --bs-alert-border-color: color-mix(in srgb, #f59e0b 22%, var(--fox-border));
}

.trading-report-page .form-select,
.trading-report-page .form-control {
    background: var(--fox-surface-2);
    color: var(--fox-text);
    border: 1px solid var(--fox-border);
}

.trading-report-page .form-select:focus,
.trading-report-page .form-control:focus {
    background: var(--fox-surface-2);
    color: var(--fox-text);
    border-color: color-mix(in srgb, var(--fox-link) 35%, var(--fox-border));
    box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--fox-link) 16%, transparent);
}

.trading-report-page .form-select:disabled,
.trading-report-page .form-control:disabled {
    background: color-mix(in srgb, var(--fox-surface-2) 75%, var(--fox-bg));
    color: var(--fox-text-muted);
}

.trading-report-page .form-select option {
    background: var(--fox-surface);
    color: var(--fox-text);
}


/* --- Shared scrip selection dialog --- */
.scripselect-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1390;
}

.scripselect-dialog {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(42rem, calc(100vw - 2rem));
    max-height: min(72vh, 44rem);
    display: flex;
    flex-direction: column;
    background: var(--mud-palette-surface, #fff);
    color: var(--mud-palette-text-primary, #1f2937);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    box-shadow: 0 24px 60px var(--fox-overlay-bg);
    z-index: 1400;
    overflow: hidden;
}

.scripselect-dialog,
.scripselect-dialog *,
.scripselect-backdrop {
    box-sizing: border-box;
}

.scripselect-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.scripselect-dialog__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.scripselect-dialog__close {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.scripselect-dialog__body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    padding: 1rem 1.1rem 1.1rem;
}

.scripselect-dialog__search {
    margin: 0;
}

.scripselect-dialog__results {
    min-height: 14rem;
    max-height: calc(min(72vh, 44rem) - 8rem);
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.05);
}

.scripselect-dialog__result,
.scripselect-dialog__result-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0.95rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: transparent;
}

.scripselect-dialog__result {
    cursor: pointer;
    text-align: left;
}

.scripselect-dialog__result-row:last-child,
.scripselect-dialog__result:last-child {
    border-bottom: 0;
}

.scripselect-dialog__result:hover,
.scripselect-dialog__result-row:hover {
    background: rgba(59, 130, 246, 0.08);
}

.scripselect-dialog__result-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1 1 auto;
}

.scripselect-dialog__result-icon {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--mud-palette-primary, #2563eb);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.scripselect-dialog__result-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
}

.scripselect-dialog__result-code {
    color: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.scripselect-dialog__result-name {
    color: var(--mud-palette-text-secondary, #64748b);
    font-size: 0.78rem;
    line-height: 1.2;
    word-break: break-word;
}

.scripselect-dialog__result-exchange {
    margin-left: auto;
    color: var(--mud-palette-text-secondary, #64748b);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scripselect-dialog__add-btn {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: transparent;
    color: var(--mud-palette-primary, #2563eb);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.scripselect-dialog__add-btn.is-added,
.scripselect-dialog__add-btn:disabled {
    color: var(--mud-palette-success, #16a34a);
    cursor: default;
}

.scripselect-dialog__empty {
    padding: 1rem;
    color: var(--mud-palette-text-secondary, #64748b);
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .scripselect-dialog {
        top: 1rem;
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 2rem);
    }
}


/* Workspace polish */
.fr-report-item {
    transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.fr-report-item:hover {
    background: color-mix(in srgb, var(--fox-link) 10%, var(--fox-surface));
    color: var(--fox-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fox-link) 24%, var(--fox-border));
}

body.mud-theme-dark .fr-report-item:hover {
    background: color-mix(in srgb, var(--fox-link) 12%, var(--fox-surface));
    color: var(--fox-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fox-link) 30%, var(--fox-border));
}

.top-nav-shell {
    box-shadow: none;
}

.top-nav-shell__inner {
    min-height: 2.65rem;
    padding: 0.35rem 0.9rem;
}


.fox-compact-grid {
    --fox-grid-font-size: 13px;
    --fox-grid-cell-padding-y: 6px;
    --fox-grid-cell-padding-x: 8px;
    --fox-grid-line-height: 1.15;
}

.fox-compact-grid .mud-data-grid,
.fox-compact-grid .mud-table-root,
.fox-compact-grid .mud-table-head,
.fox-compact-grid .mud-table-body,
.fox-compact-grid .mud-table-cell,
.fox-compact-grid .column-header,
.fox-compact-grid .mud-sort-label,
.fox-compact-grid .mud-table-sort-label,
.fox-compact-grid .mud-input,
.fox-compact-grid .mud-input-slot,
.fox-compact-grid table,
.fox-compact-grid th,
.fox-compact-grid td {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    font-size: var(--fox-grid-font-size);
    line-height: var(--fox-grid-line-height);
}

.fox-compact-grid .mud-table-cell,
.fox-compact-grid th,
.fox-compact-grid td {
    padding-top: var(--fox-grid-cell-padding-y) !important;
    padding-bottom: var(--fox-grid-cell-padding-y) !important;
    padding-left: var(--fox-grid-cell-padding-x) !important;
    padding-right: var(--fox-grid-cell-padding-x) !important;
    white-space: nowrap;
    vertical-align: middle;
}

.fox-compact-grid .mud-table-head .mud-table-cell,
.fox-compact-grid .mud-data-grid thead .mud-table-cell,
.fox-compact-grid thead th,
.fox-compact-grid .column-header {
    font-size: var(--fox-grid-font-size) !important;
    font-weight: 600;
    line-height: var(--fox-grid-line-height);
}

.fox-compact-grid .column-header,
.fox-compact-grid .mud-sort-label,
.fox-compact-grid .mud-table-sort-label {
    gap: 0.25rem;
    white-space: nowrap;
}

.fox-compact-grid .mud-table-sort-label-icon,
.fox-compact-grid .mud-sort-label-icon {
    font-size: 0.95rem;
}
.tickwatch-filter__message{padding:8px 10px;border-radius:8px;margin-bottom:10px;background:rgba(220,38,38,.12);color:#b91c1c;font-size:13px;}


/* Filter dialog segment select popover */
body.mud-theme-dark .filter-segment-popover .mud-paper,
body.mud-theme-dark .filter-segment-popover .mud-list {
    background: #0b1730 !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

body.mud-theme-dark .filter-segment-popover .mud-list-item,
body.mud-theme-dark .filter-segment-popover .mud-list-item-text {
    color: #e5e7eb !important;
}

body.mud-theme-dark .filter-segment-popover .mud-selected-item,
body.mud-theme-dark .filter-segment-popover .mud-list-item:hover {
    background: rgba(37, 99, 235, 0.22) !important;
}

body:not(.mud-theme-dark) .filter-segment-popover .mud-paper,
body:not(.mud-theme-dark) .filter-segment-popover .mud-list {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(148, 163, 184, 0.30);
}

body:not(.mud-theme-dark) .filter-segment-popover .mud-list-item,
body:not(.mud-theme-dark) .filter-segment-popover .mud-list-item-text {
    color: #0f172a !important;
}

body:not(.mud-theme-dark) .filter-segment-popover .mud-selected-item,
body:not(.mud-theme-dark) .filter-segment-popover .mud-list-item:hover {
    background: rgba(37, 99, 235, 0.12) !important;
}


/* Report grid explicit font override */
.report-view-mud-grid .mud-table-root,
.report-view-mud-grid .mud-table-root .mud-table-head,
.report-view-mud-grid .mud-table-root .mud-table-body,
.report-view-mud-grid .mud-table-root .mud-table-footer,
.report-view-mud-grid .mud-table-root .mud-table-cell,
.report-view-mud-grid .mud-table-root .mud-sort-label,
.report-view-mud-grid .mud-table-root .mud-table-sort-label,
.report-view-mud-grid .mud-table-root .column-header,
.report-view-mud-grid .mud-table-root .mud-input,
.report-view-mud-grid .mud-table-root .mud-input-slot,
.report-view-mud-grid .mud-table-root table,
.report-view-mud-grid .mud-table-root th,
.report-view-mud-grid .mud-table-root td {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
}

.report-view-mud-grid .mud-table-root .mud-table-body .mud-table-cell,
.report-view-mud-grid .mud-table-root .mud-table-head .mud-table-cell,
.report-view-mud-grid .mud-table-root thead .mud-table-cell,
.report-view-mud-grid .mud-table-root tbody .mud-table-cell,
.report-view-mud-grid .mud-table-root th,
.report-view-mud-grid .mud-table-root td,
.qg-scroll.quickgrid-roboto table,
.qg-scroll.quickgrid-roboto thead th,
.qg-scroll.quickgrid-roboto tbody td,
.qg-scroll.quickgrid-roboto .col-sort-desc,
.qg-scroll.quickgrid-roboto .col-sort-asc {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
}

/* TickWatch and EventWatch explicit font override */
.tickwatch-mud-grid .mud-table-root,
.tickwatch-mud-grid .mud-table-root .mud-table-head,
.tickwatch-mud-grid .mud-table-root .mud-table-body,
.tickwatch-mud-grid .mud-table-root .mud-table-footer,
.tickwatch-mud-grid .mud-table-root .mud-table-cell,
.tickwatch-mud-grid .mud-table-root .mud-sort-label,
.tickwatch-mud-grid .mud-table-root .mud-table-sort-label,
.tickwatch-mud-grid .mud-table-root .column-header,
.tickwatch-mud-grid .mud-table-root .mud-input,
.tickwatch-mud-grid .mud-table-root .mud-input-slot,
.tickwatch-mud-grid .mud-table-root table,
.tickwatch-mud-grid .mud-table-root th,
.tickwatch-mud-grid .mud-table-root td,
.event-watch-mud-grid .mud-table-root,
.event-watch-mud-grid .mud-table-root .mud-table-head,
.event-watch-mud-grid .mud-table-root .mud-table-body,
.event-watch-mud-grid .mud-table-root .mud-table-footer,
.event-watch-mud-grid .mud-table-root .mud-table-cell,
.event-watch-mud-grid .mud-table-root .mud-sort-label,
.event-watch-mud-grid .mud-table-root .mud-table-sort-label,
.event-watch-mud-grid .mud-table-root .column-header,
.event-watch-mud-grid .mud-table-root .mud-input,
.event-watch-mud-grid .mud-table-root .mud-input-slot,
.event-watch-mud-grid .mud-table-root table,
.event-watch-mud-grid .mud-table-root th,
.event-watch-mud-grid .mud-table-root td {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
}

.tickwatch-mud-grid .mud-table-root .mud-table-body .mud-table-cell,
.tickwatch-mud-grid .mud-table-root .mud-table-head .mud-table-cell,
.tickwatch-mud-grid .mud-table-root thead .mud-table-cell,
.tickwatch-mud-grid .mud-table-root tbody .mud-table-cell,
.tickwatch-mud-grid .mud-table-root th,
.tickwatch-mud-grid .mud-table-root td,
.event-watch-mud-grid .mud-table-root .mud-table-body .mud-table-cell,
.event-watch-mud-grid .mud-table-root .mud-table-head .mud-table-cell,
.event-watch-mud-grid .mud-table-root thead .mud-table-cell,
.event-watch-mud-grid .mud-table-root tbody .mud-table-cell,
.event-watch-mud-grid .mud-table-root th,
.event-watch-mud-grid .mud-table-root td {
    font-size: 13px !important;
}


/* 879: Touchline MudDataGrid must override MudBlazor body2 defaults and match Tick Watch compact grid typography. */
.touchline-mud-grid .mud-table-root,
.touchline-mud-grid .mud-table-root .mud-table-head,
.touchline-mud-grid .mud-table-root .mud-table-body,
.touchline-mud-grid .mud-table-root .mud-table-footer,
.touchline-mud-grid .mud-table-root .mud-table-cell,
.touchline-mud-grid .mud-table-root .mud-sort-label,
.touchline-mud-grid .mud-table-root .mud-table-sort-label,
.touchline-mud-grid .mud-table-root .column-header,
.touchline-mud-grid .mud-table-root .mud-input,
.touchline-mud-grid .mud-table-root .mud-input-slot,
.touchline-mud-grid .mud-table-root table,
.touchline-mud-grid .mud-table-root th,
.touchline-mud-grid .mud-table-root td {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
}

.touchline-mud-grid .mud-table-root .mud-table-body .mud-table-cell,
.touchline-mud-grid .mud-table-root .mud-table-head .mud-table-cell,
.touchline-mud-grid .mud-table-root thead .mud-table-cell,
.touchline-mud-grid .mud-table-root tbody .mud-table-cell,
.touchline-mud-grid .mud-table-root th,
.touchline-mud-grid .mud-table-root td {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}


.feature-pane { display:flex; flex-direction:column; gap:12px; height:100%; padding:12px; min-height:0; }
.feature-pane__header { display:flex; flex-direction:column; align-items:stretch; gap:10px; }
.feature-pane__title { font-weight:700; font-size:1rem; }
.feature-pane__controls { display:flex; flex-wrap:nowrap; align-items:center; gap:10px; width:100%; overflow-x:auto; padding-bottom:2px; }
.feature-pane__field { min-width:120px; }
.feature-pane__field--wide { min-width:220px; }
.feature-pane__field--narrow { width:96px; min-width:96px; max-width:96px; }
.feature-pane__field--tiny { width:88px; min-width:88px; max-width:88px; }
.feature-pane__field--small { width:104px; min-width:104px; max-width:104px; }
.feature-pane__field--compact { width:120px; min-width:120px; max-width:120px; }
.feature-pane__caption { min-width:120px; font-size:.9rem; opacity:.85; }
.feature-pane__caption-box { min-height:40px; display:flex; align-items:center; padding:0 12px; border:1px solid var(--fox-border); border-radius:10px; background:var(--fox-surface-2); }
.feature-pane__caption--grow { flex:1 1 260px; min-width:220px; }
.feature-pane__caption--wider { flex:1 1 320px; min-width:320px; }
.feature-pane__status { font-size:.9rem; opacity:.9; }
.feature-pane__picker { position:relative; }
.feature-pane__picker-button { height:40px; padding:0 14px; border-radius:10px; border:1px solid var(--fox-border); background:transparent; color:inherit; font-weight:600; }
.feature-pane__picker-backdrop { position:fixed; inset:0; z-index:14; background:transparent; }
.feature-pane__picker-menu { position:absolute; z-index:15; top:44px; left:0; width:260px; max-height:320px; overflow:auto; border:1px solid var(--fox-border); border-radius:10px; background:var(--fox-surface); box-shadow: var(--fox-shadow-sm); padding:10px; }
.feature-pane__picker-actions { display:flex; gap:10px; margin-bottom:8px; }
.feature-pane__picker-link { border:0; background:transparent; color:var(--fox-primary); font-weight:600; padding:0; }
.feature-pane__picker-list { display:flex; flex-direction:column; gap:6px; }
.feature-pane__picker-item { display:flex; align-items:center; gap:8px; font-size:.9rem; }
.feature-pane__icon-toggle { width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; border:1px solid var(--fox-border); background:transparent; cursor:pointer; }
.feature-pane__icon-toggle.is-play { color:var(--fox-positive); background:var(--fox-positive-soft); }
.feature-pane__icon-toggle.is-stop { color:var(--fox-negative); background:var(--fox-negative-soft); }
.feature-pane__icon-toggle:hover { box-shadow: var(--fox-shadow-sm); }
.feature-pane__controls > * { flex:0 0 auto; }

.feature-table { width:100%; border-collapse:collapse; font-size:.92rem; }
.feature-table th, .feature-table td { border:1px solid var(--fox-border); padding:7px 8px; white-space:nowrap; }
.feature-table tbody tr:hover { background:rgba(37,99,235,.06); cursor:pointer; }
.feature-table tbody tr.is-selected { background:rgba(37,99,235,.12); }
.feature-table--seasonality td, .feature-table--seasonality th { text-align:center; }
.feature-table--seasonality td:first-child, .feature-table--seasonality th:first-child { text-align:left; }
.feature-table--seasonality tbody tr.is-average td { font-weight:700; }
/* Sector Performance redesign: Chart View stays custom; Table View uses MudDataGrid styled like Market Map. */
/* Sector Performance redesign: keep pane full-width and pane-aware without shrinking content. */
.sectorperf-root {
  container-type:inline-size;
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  align-self:stretch;
  width:100%;
  max-width:100%;
  height:100%;
  max-height:100%;
  min-height:0;
  min-width:0;
  box-sizing:border-box;
  overflow:hidden;
}
.sectorperf-root .feature-pane__header { flex:0 0 auto; min-width:0; width:100%; }
.sectorperf-root .feature-pane__title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sectorperf-root .feature-pane__controls { align-items:center; min-width:0; width:100%; flex-direction:row; }
.sectorperf-summary { flex:0 0 auto; display:grid; grid-template-columns:repeat(4, minmax(150px, 1fr)); gap:12px; min-width:0; width:100%; }
.sectorperf-summary-card { min-width:0; border:1px solid var(--fox-border); border-radius:10px; padding:10px 12px; background:linear-gradient(135deg, color-mix(in srgb, var(--fox-surface-2) 84%, var(--fox-surface) 16%), var(--fox-surface)); color:var(--fox-text); box-shadow:var(--fox-shadow-sm); overflow:hidden; }
.sectorperf-summary-card--positive { border-color:color-mix(in srgb, var(--fox-positive) 45%, var(--fox-border)); }
.sectorperf-summary-card--negative { border-color:color-mix(in srgb, var(--fox-negative) 45%, var(--fox-border)); }
.sectorperf-summary-card--selected { border-color:color-mix(in srgb, var(--fox-accent) 50%, var(--fox-border)); }
.sectorperf-summary-card__label { font-size:.76rem; font-weight:700; opacity:.82; margin-bottom:4px; }
.sectorperf-summary-card__name { font-size:.86rem; line-height:1.15; min-height:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sectorperf-summary-card__value { margin-top:6px; font-size:1.05rem; font-weight:800; font-variant-numeric:tabular-nums; }
.sectorperf-summary-card__value.is-positive { color:var(--fox-positive); }
.sectorperf-summary-card__value.is-negative { color:var(--fox-negative); }
.sectorperf-layout { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:12px; min-height:0; min-width:0; width:100%; max-width:100%; flex:1 1 auto; overflow:hidden; align-self:stretch; }
.sectorperf-layout.is-table { grid-template-columns:minmax(0, 38%) minmax(0, 62%); }
.sectorperf-layout.is-chart { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
.sectorperf-panel { display:flex; flex-direction:column; border:1px solid var(--fox-border); border-radius:10px; min-height:0; min-width:0; overflow:hidden; background:var(--fox-surface); color:var(--fox-text); }
.sectorperf-panel__title { flex:0 0 auto; padding:8px 10px; font-weight:700; border-bottom:1px solid var(--fox-border); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sectorperf-chartlist { overflow:auto; min-height:0; min-width:0; flex:1 1 auto; }
.sectorperf-tablehost { min-height:0; min-width:0; flex:1 1 auto; display:flex; flex-direction:column; overflow:hidden; }
.sectorperf-chartrow { display:grid; grid-template-columns:minmax(120px, 1fr) minmax(180px, 1fr); width:100%; align-items:center; gap:10px; border:0; border-bottom:1px solid var(--fox-border); background:transparent; color:inherit; padding:8px 10px; text-align:left; }
.sectorperf-chartrow.is-selected, .sectorperf-chartrow:hover { background:var(--fox-accent-soft); }
.sectorperf-chartrow__name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sectorperf-chartrow__barbox { position:relative; min-width:0; }
.sectorperf-bar { position:relative; display:block; height:24px; background:var(--fox-surface-2); border-radius:6px; overflow:hidden; }
.sectorperf-bar__zero { position:absolute; left:50%; top:0; bottom:0; width:1px; background:var(--fox-text-muted); opacity:.72; }
.sectorperf-bar__fill { position:absolute; top:0; bottom:0; }
.sectorperf-bar__fill--neg { right:50%; background:var(--fox-negative); opacity:.74; }
.sectorperf-bar__fill--pos { left:50%; background:var(--fox-positive); opacity:.74; }
.sectorperf-bar__text { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.82rem; font-weight:700; }
.sectorperf-mud-grid-wrap { flex:1 1 auto; min-height:0; min-width:0; height:100%; width:100%; overflow:hidden; }
.sectorperf-mud-grid-wrap .mud-grid-table-inner { height:100%; min-height:0; min-width:0; width:100%; overflow:hidden; }
.sectorperf-grid-cell { min-height:22px; display:flex; align-items:center; cursor:pointer; color:inherit; }
.sectorperf-grid-cell--name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sectorperf-grid-cell--num { justify-content:flex-end; font-variant-numeric:tabular-nums; }
.sectorperf-mud-grid .mud-table-container { height:100% !important; overflow:auto !important; }
.sectorperf-mud-grid .mud-table-cell,
.sectorperf-mud-grid .mud-table-sort-label,
.sectorperf-mud-grid .mud-table-root th,
.sectorperf-mud-grid .mud-table-root td { font-size:13px !important; line-height:1.15 !important; font-family:'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important; }
.sectorperf-mud-grid .mud-table-cell { padding:3px 8px !important; height:26px !important; }
.sectorperf-mud-grid .mud-table-head .mud-table-cell,
.sectorperf-mud-grid .mud-table-root thead .mud-table-cell,
.sectorperf-mud-grid .mud-table-root th { height:28px !important; min-height:28px !important; font-weight:700 !important; background:var(--fox-surface) !important; position:sticky; top:0; z-index:3; }
.sectorperf-mud-grid .mud-table-row.sectorperf-grid-row.is-selected > td,
.sectorperf-mud-grid .mud-table-body tr.sectorperf-grid-row.is-selected > td { background:var(--fox-accent-soft) !important; box-shadow:inset 3px 0 0 var(--fox-accent); }
.sectorperf-change-pill { display:inline-flex; align-items:center; justify-content:flex-end; min-width:58px; padding:2px 6px; border-radius:999px; font-weight:700; font-variant-numeric:tabular-nums; }
.sectorperf-change-pill.is-positive { color:var(--fox-positive); background:var(--fox-positive-soft); }
.sectorperf-change-pill.is-negative { color:var(--fox-negative); background:var(--fox-negative-soft); }
.sectorperf-root.is-pane-medium .sectorperf-summary { gap:8px; }
.sectorperf-root.is-pane-medium .sectorperf-summary-card { padding:8px 10px; }
.sectorperf-root.is-pane-medium .sectorperf-summary { grid-template-columns:repeat(4, minmax(120px, 1fr)); }
.sectorperf-root.is-summary-hidden .sectorperf-summary { display:none !important; }
.sectorperf-root.is-pane-compact .feature-pane__controls,
.sectorperf-root.is-pane-micro .feature-pane__controls { gap:6px; flex-wrap:wrap; overflow-x:visible; }
.sectorperf-root.is-pane-compact .sectorperf-layout { gap:8px; }
.sectorperf-root.is-pane-micro .sectorperf-layout { grid-template-columns:1fr !important; gap:8px; }
.sectorperf-root.is-pane-compact .sectorperf-panel,
.sectorperf-root.is-pane-micro .sectorperf-panel { border-radius:8px; }
.sectorperf-root.is-pane-compact .sectorperf-mud-grid .mud-table-cell,
.sectorperf-root.is-pane-micro .sectorperf-mud-grid .mud-table-cell { padding:2px 6px !important; height:24px !important; }
/* Width-only fallback: keep vertical 2-pane layouts rich. Summary visibility is controlled by the pane resize logic via is-summary-hidden. */
@container (max-width:760px) { .sectorperf-root .sectorperf-layout { gap:8px; } }
@container (max-width:560px) { .sectorperf-root .sectorperf-layout { grid-template-columns:1fr !important; } }
.feature-pane--marketmap { gap:8px; padding:10px; width:100%; max-width:100%; height:100%; min-width:0; min-height:0; flex:1 1 auto; box-sizing:border-box; overflow:hidden; }
.feature-pane--marketmap .feature-pane__header { gap:6px; }
.feature-pane--marketmap .feature-pane__title { font-size:.95rem; line-height:1.15; }
.feature-pane--marketmap .feature-pane__controls { gap:8px; padding-bottom:0; align-items:center; }
.feature-pane--marketmap .feature-pane__caption-box { min-height:34px; height:34px; padding:0 10px; border-radius:9px; font-size:.84rem; }
.feature-pane--marketmap .feature-pane__caption--grow { min-width:180px; }
.feature-pane--marketmap .feature-pane__caption--wider { min-width:220px; }
.feature-pane--marketmap .mud-input-control { margin-top:0; margin-bottom:0; }
.feature-pane--marketmap .mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-outlined { min-height:34px; }
.feature-pane--marketmap .mud-input-control .mud-input > input,
.feature-pane--marketmap .mud-input-control .mud-input-slot { font-size:.84rem; padding-top:7px; padding-bottom:7px; }
.feature-pane--marketmap .mud-input-control .mud-input-label { font-size:.76rem; }
.marketmap-select-popover .mud-list-item,
.marketmap-select-popover .mud-list-item-text,
.marketmap-select-popover .mud-typography { font-size:.84rem !important; line-height:1.2 !important; }
.marketmap-select-popover .mud-list-item { min-height:34px !important; padding-top:6px !important; padding-bottom:6px !important; }
.feature-pane--marketmap .marketmap-control--group { min-width:74px; height:34px; padding:0 10px; font-size:.78rem; font-weight:700; }
.feature-pane--marketmap .marketmap-control--select { width:112px; min-width:112px; max-width:112px; }
.feature-pane--marketmap .marketmap-control--step { width:82px; min-width:82px; max-width:82px; }
.marketmap-refresh-btn { flex:0 0 auto; width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--fox-border); border-radius:9px; background:var(--fox-primary); color:var(--fox-tooltip-text); cursor:pointer; box-shadow: var(--fox-shadow-sm); }
.marketmap-refresh-btn:hover { filter:brightness(1.05); }
.marketmap-refresh-btn:active { transform:translateY(1px); }
.marketmap-refresh-icon { width:16px; height:16px; display:block; shape-rendering:geometricPrecision; }
.marketmap-layout { display:flex; flex-direction:column; gap:6px; min-height:0; min-width:0; flex:1 1 auto; overflow:hidden; width:100%; }
.marketmap-chart-host { flex:0 0 min(34%, 210px); min-height:105px; max-height:220px; min-width:0; width:min(100%, 860px); max-width:100%; align-self:flex-start; }
.marketmap-chart { width:100%; height:100%; min-height:0; border:1px solid var(--fox-border); border-radius:10px; background: var(--fox-surface-2); padding:2px; overflow:hidden; }
.marketmap-grid-host { min-height:0; min-width:0; flex:1 1 auto; display:flex; flex-direction:column; overflow:hidden; width:min(100%, 860px); max-width:100%; align-self:flex-start; }
.marketmap-filter-status { flex:0 0 auto; font-size:.84rem; line-height:1.15; margin:0 0 3px 0; color:var(--fox-text); }
.marketmap-mud-grid-wrap { flex:1 1 auto; min-height:0; min-width:0; height:100%; width:100%; overflow:hidden; }
.marketmap-mud-grid-wrap .mud-grid-table-inner { height:100%; min-height:0; min-width:0; width:100%; overflow:hidden; }
.marketmap-cell { min-height:22px; display:flex; align-items:center; cursor:pointer; }
.marketmap-cell--num { justify-content:flex-end; font-variant-numeric:tabular-nums; }
.marketmap-mud-grid .mud-table-container { height:100% !important; overflow:auto !important; }
.marketmap-mud-grid .mud-table-cell,
.marketmap-mud-grid .mud-table-sort-label,
.marketmap-mud-grid .mud-table-root th,
.marketmap-mud-grid .mud-table-root td { font-size:13px !important; line-height:1.15 !important; }
.marketmap-mud-grid .mud-table-cell { padding:3px 8px !important; height:26px !important; }
.marketmap-mud-grid .mud-table-head .mud-table-cell { height:28px !important; font-weight:700 !important; }
@media (max-height: 720px) {
  .feature-pane--marketmap { gap:6px; padding:8px; }
  .feature-pane--marketmap .feature-pane__title { font-size:.9rem; }
  .feature-pane--marketmap .feature-pane__controls { gap:6px; }
  .feature-pane--marketmap .feature-pane__caption-box { height:30px; min-height:30px; font-size:.8rem; }
  .feature-pane--marketmap .marketmap-control--group { height:30px; min-width:66px; padding:0 8px; font-size:.72rem; }
  .feature-pane--marketmap .mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-outlined { min-height:30px; }
  .feature-pane--marketmap .mud-input-control .mud-input > input,
  .feature-pane--marketmap .mud-input-control .mud-input-slot { font-size:.8rem; padding-top:5px; padding-bottom:5px; }
  .feature-pane--marketmap .marketmap-control--select { width:104px; min-width:104px; max-width:104px; }
  .feature-pane--marketmap .marketmap-control--step { width:74px; min-width:74px; max-width:74px; }
  .marketmap-refresh-btn { width:30px; height:30px; border-radius:8px; }
  .marketmap-refresh-icon { width:14px; height:14px; }
  .marketmap-filter-status { font-size:.8rem; margin-bottom:2px; }
}

.seasonality-grid-host { min-height:0; flex:1; overflow:auto; }
.seasonality-cell { min-width:64px; }
.seasonality-legend { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.seasonality-legend__item { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border:1px solid var(--fox-border); border-radius:999px; font-size:.82rem; }
.seasonality-legend__swatch { width:14px; height:14px; border-radius:4px; display:inline-block; }
.seasonality-legend__label { white-space:nowrap; }
/* Sector Performance sector selector popup */
.sector-select-backdrop { position:fixed; inset:0; z-index:5000; background:var(--fox-overlay); }
.sector-select-popup { position:fixed; top:78px; left:50%; transform:translateX(-50%); z-index:5001; width:340px; max-width:calc(100vw - 24px); max-height:min(520px, calc(100vh - 110px)); display:flex; flex-direction:column; min-height:0; padding:10px; border:1px solid var(--fox-border); border-radius:12px; background:var(--fox-surface); color:var(--fox-text); box-shadow:var(--fox-shadow-lg); }
.sector-select-popup__header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; font-weight:700; }
.sector-select-popup__header button { border:0; background:transparent; color:inherit; font-size:20px; line-height:1; cursor:pointer; }
.sector-select-popup__search { display:block; width:100%; flex:0 0 40px; height:40px; min-height:40px; line-height:20px; box-sizing:border-box; margin:0 0 10px 0; padding:8px 10px; border:1px solid var(--fox-border); border-radius:10px; background:transparent; color:inherit; outline:none; font:inherit; font-size:.92rem; appearance:none; -webkit-appearance:none; }
.sector-select-popup__search::placeholder { color:var(--fox-text-muted); opacity:1; }
.sector-select-popup__actions { display:flex; align-items:center; gap:8px; margin-bottom:8px; font-size:.85rem; }
.sector-select-popup__actions button { border:1px solid var(--fox-border); border-radius:7px; background:transparent; color:inherit; padding:4px 8px; cursor:pointer; }
.sector-select-popup__actions span { margin-left:auto; opacity:.85; white-space:nowrap; }
.sector-select-popup__list { overflow:auto; display:flex; flex-direction:column; gap:4px; min-height:0; }
.sector-select-popup__item { display:flex; align-items:center; gap:8px; min-height:28px; font-size:.9rem; cursor:pointer; }

/* Compact MudDataGrid table views for Net Credit and Option Time Series. Keep sizing aligned with Market Map/report grids. */
.netcredit-mud-grid-wrap,
.optionts-mud-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.netcredit-mud-grid-wrap .mud-grid-table-inner,
.optionts-mud-grid-wrap .mud-grid-table-inner {
    height: 100%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.netcredit-pane__grid-num,
.optionts-pane__grid-num {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 22px;
    font-variant-numeric: tabular-nums;
}

/* Global themed tooltips --------------------------------------------------
   Native browser title tooltips cannot be themed. foxTooltips.js converts
   title attributes to data-fox-tooltip and renders this shared tooltip so
   all app tooltips match the left workspace strip style. */
:root,
body {
    --fox-tooltip-bg: color-mix(in srgb, var(--fox-surface) 94%, var(--fox-surface-2));
    --fox-tooltip-text: var(--fox-text);
    --fox-tooltip-border: var(--fox-border-strong);
    --fox-tooltip-shadow: var(--fox-shadow-lg);
}

.fox-global-tooltip {
    position: fixed;
    z-index: 5000;
    max-width: min(320px, calc(100vw - 24px));
    padding: 0.42rem 0.68rem;
    border: 1px solid var(--fox-tooltip-border);
    border-radius: 0.62rem;
    background: var(--fox-tooltip-bg);
    color: var(--fox-tooltip-text);
    box-shadow: var(--fox-tooltip-shadow);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    white-space: normal;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px) scale(0.98);
    transition: opacity 0.12s ease, visibility 0.12s ease, transform 0.12s ease;
}

.fox-global-tooltip.is-measuring {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: none;
}

.fox-global-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fox-global-tooltip::before {
    content: "";
    position: absolute;
    left: var(--fox-tooltip-arrow-left, 50%);
    width: 0.58rem;
    height: 0.58rem;
    background: var(--fox-tooltip-bg);
    border-left: 1px solid var(--fox-tooltip-border);
    border-bottom: 1px solid var(--fox-tooltip-border);
    pointer-events: none;
}

.fox-global-tooltip--top::before {
    bottom: -0.33rem;
    transform: translateX(-50%) rotate(-45deg);
}

.fox-global-tooltip--bottom::before {
    top: -0.33rem;
    transform: translateX(-50%) rotate(135deg);
}

/* Keep Bootstrap/MudBlazor/toolkit tooltips visually identical to Fox tooltips. */
.tooltip,
.tooltip.show,
.bs-tooltip-auto,
.bs-tooltip-top,
.bs-tooltip-end,
.bs-tooltip-bottom,
.bs-tooltip-start,
.mud-tooltip,
.mud-tooltip-root,
.mud-popover.mud-tooltip {
    --bs-tooltip-bg: var(--fox-tooltip-bg);
    --bs-tooltip-color: var(--fox-tooltip-text);
    --bs-tooltip-opacity: 1;
}

.tooltip .tooltip-inner,
.bs-tooltip-auto .tooltip-inner,
.bs-tooltip-top .tooltip-inner,
.bs-tooltip-end .tooltip-inner,
.bs-tooltip-bottom .tooltip-inner,
.bs-tooltip-start .tooltip-inner,
.mud-tooltip,
.mud-popover.mud-tooltip,
.mud-tooltip-root .mud-tooltip {
    background: var(--fox-tooltip-bg) !important;
    color: var(--fox-tooltip-text) !important;
    border: 1px solid var(--fox-tooltip-border) !important;
    border-radius: 0.62rem !important;
    box-shadow: var(--fox-tooltip-shadow) !important;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    opacity: 1 !important;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--fox-tooltip-border) !important;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--fox-tooltip-border) !important;
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: var(--fox-tooltip-border) !important;
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: var(--fox-tooltip-border) !important;
}



.fox-num {
    text-align: right !important;
}

.fox-num-nowrap {
    text-align: right !important;
    white-space: nowrap;
}

.fox-num input,
.fox-num-nowrap input {
    text-align: right;
}

/* Report menu hierarchy polish: theme-neutral 3-level visual hierarchy */
.report-menu-tree {
    --fr-menu-group-bg: var(--fox-surface-2);
    --fr-menu-section-bg: color-mix(in srgb, var(--fox-control-bg) 74%, var(--fox-control-active-bg));
    --fr-menu-section-hover-bg: var(--fox-control-hover-bg);
    --fr-menu-report-hover-bg: var(--fox-control-hover-bg);
    --fr-menu-report-active-bg: var(--fox-selection-bg, color-mix(in srgb, var(--fox-primary) 14%, var(--fox-surface)));
    --fr-menu-report-active-hover-bg: color-mix(in srgb, var(--fox-selection-accent, var(--fox-primary)) 20%, var(--fox-surface));
    --fr-menu-report-active-border: var(--fox-selection-border, color-mix(in srgb, var(--fox-primary) 38%, var(--fox-border)));
    --fr-menu-report-active-accent: var(--fox-selection-accent, var(--fox-primary));
    --fr-menu-guide: color-mix(in srgb, var(--fox-border-strong) 68%, transparent);
    --fr-menu-dot: color-mix(in srgb, var(--fox-text-muted) 55%, transparent);
}

.fr-group {
    background: var(--fox-surface);
    border-color: var(--fox-border);
}

.fr-group-toggle {
    padding: 0.82rem 0.78rem;
    background: var(--fr-menu-group-bg);
    color: var(--fox-text);
    border-bottom: 1px solid var(--fox-border);
    font-size: 0.96rem;
    font-weight: 800;
}

.fr-group-toggle:hover {
    background: var(--fox-control-hover-bg);
    color: var(--fox-text);
}

.fr-group-body {
    padding: 0.38rem 0.34rem 0.48rem;
    background: var(--fox-surface);
}

.fr-section-toggle {
    margin: 0.18rem 0.12rem 0.24rem;
    padding: 0.48rem 0.56rem;
    background: var(--fr-menu-section-bg);
    color: var(--fox-text-muted);
    border: 1px solid var(--fox-border);
    border-left: 3px solid var(--fox-border-strong);
    border-radius: 0.72rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.085em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fox-surface) 58%, transparent);
}

.fr-section-toggle:hover {
    background: var(--fr-menu-section-hover-bg);
    color: var(--fox-text);
    border-color: var(--fox-control-hover-border);
}

.fr-section-toggle.is-open {
    color: var(--fox-text);
    background: color-mix(in srgb, var(--fox-control-hover-bg) 68%, var(--fox-surface));
    border-color: var(--fox-control-hover-border);
}

.fr-section-title::before {
    content: "";
    display: inline-block;
    width: 0.48rem;
    height: 0.48rem;
    margin-right: 0.42rem;
    border: 1px solid var(--fox-border-strong);
    border-radius: 0.16rem;
    background: color-mix(in srgb, var(--fox-surface-3) 72%, var(--fox-surface));
    vertical-align: -0.02rem;
}

.fr-section-body {
    margin: 0.05rem 0 0.42rem 0.88rem;
    padding: 0.08rem 0 0.08rem 0.55rem;
    background: transparent;
    border-left: 1px dashed var(--fr-menu-guide);
}

.fr-section-body-noheader {
    padding: 0.2rem 0.35rem 0.35rem;
    background: transparent;
}

.fr-report-item {
    position: relative;
    margin: 0.1rem 0.12rem 0.1rem 0;
    padding: 0.48rem 0.58rem 0.48rem 0.64rem;
    background: transparent;
    color: var(--fox-text);
    border: 1px solid transparent;
    border-radius: 0.66rem;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.25;
    box-shadow: none;
}

.fr-section-body .fr-report-item,
.fr-section-body-noheader .fr-report-item {
    padding-left: 0.64rem;
}

.report-menu-item-line {
    gap: 0.38rem;
}

.report-menu-item-line::before {
    content: "";
    width: 0.36rem;
    height: 0.36rem;
    flex: 0 0 0.36rem;
    border-radius: 999px;
    background: var(--fr-menu-dot);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--fox-surface) 80%, transparent);
}

.fr-report-item:hover {
    background: var(--fr-menu-report-hover-bg);
    color: var(--fox-text);
    border-color: var(--fox-control-hover-border);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fox-control-hover-border) 45%, transparent);
}

.fr-report-item.active {
    background: var(--fr-menu-report-active-bg);
    color: var(--fox-text);
    border-color: var(--fr-menu-report-active-border);
    box-shadow: inset 3px 0 0 var(--fr-menu-report-active-accent);
    font-weight: 700;
}

.fr-report-item.active:hover {
    background: var(--fr-menu-report-active-hover-bg);
}

.fr-report-item.active .report-menu-item-line::before {
    background: var(--fr-menu-report-active-accent);
}

.fr-chevron {
    color: var(--fox-text-muted);
}

.fr-group-toggle.is-open .fr-chevron,
.fr-section-toggle.is-open .fr-chevron,
.fr-group-toggle:hover .fr-chevron,
.fr-section-toggle:hover .fr-chevron {
    color: var(--fox-text);
}

/* MarketMap dashboard polish - build 693 */
.feature-pane--marketmap { gap:10px; background:linear-gradient(180deg, rgba(15,23,42,.06), transparent 220px); }
.feature-pane--marketmap .feature-pane__header { padding:2px 2px 0 2px; }
.feature-pane--marketmap .feature-pane__title { font-size:1.08rem; font-weight:800; letter-spacing:.01em; }
.marketmap-layout { gap:10px; }
.marketmap-summary-strip { display:grid; grid-template-columns:minmax(150px, 1.05fr) repeat(auto-fit, minmax(150px, 1fr)); gap:10px; width:100%; min-width:0; flex:0 0 auto; }
.marketmap-summary-card { position:relative; display:flex; flex-direction:column; justify-content:center; min-height:70px; padding:12px 14px; border:1px solid var(--fox-border); border-radius:14px; background:linear-gradient(135deg, var(--fox-surface-2), rgba(148,163,184,.05)); box-shadow:var(--fox-shadow-sm); overflow:hidden; text-align:left; color:var(--fox-text); }
.marketmap-summary-card::after { content:""; position:absolute; right:-22px; top:-26px; width:86px; height:86px; border-radius:50%; background:rgba(148,163,184,.10); pointer-events:none; }
.marketmap-summary-card--button { cursor:pointer; appearance:none; -webkit-appearance:none; }
.marketmap-summary-card--button:hover { transform:translateY(-1px); box-shadow:0 10px 24px rgba(15,23,42,.16); }
.marketmap-summary-card--button.is-selected { outline:2px solid var(--fox-primary); outline-offset:-2px; }
.marketmap-summary-card--total { border-color:rgba(59,130,246,.34); background:linear-gradient(135deg, rgba(37,99,235,.18), var(--fox-surface-2)); }
.marketmap-summary-card--negative { border-color:rgba(239,68,68,.42); background:linear-gradient(135deg, rgba(239,68,68,.20), var(--fox-surface-2)); }
.marketmap-summary-card--neutral { border-color:rgba(148,163,184,.36); background:linear-gradient(135deg, rgba(100,116,139,.18), var(--fox-surface-2)); }
.marketmap-summary-card--positive { border-color:rgba(34,197,94,.42); background:linear-gradient(135deg, rgba(34,197,94,.18), var(--fox-surface-2)); }
.marketmap-summary-card__label { position:relative; z-index:1; font-size:.78rem; font-weight:700; color:var(--fox-text-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.marketmap-summary-card__value { position:relative; z-index:1; margin-top:4px; font-size:1.38rem; line-height:1.05; font-weight:850; color:var(--fox-text); font-variant-numeric:tabular-nums; }
.marketmap-summary-card__hint { position:relative; z-index:1; margin-top:5px; font-size:.78rem; font-weight:700; color:var(--fox-text-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.marketmap-summary-card--negative .marketmap-summary-card__hint,
.marketmap-summary-card--negative .marketmap-summary-card__label { color:var(--fox-negative); }
.marketmap-summary-card--positive .marketmap-summary-card__hint,
.marketmap-summary-card--positive .marketmap-summary-card__label { color:var(--fox-positive); }
.marketmap-chart-card { display:flex; flex-direction:column; min-width:0; min-height:0; flex:0 0 min(38%, 280px); max-height:310px; border:1px solid var(--fox-border); border-radius:14px; background:linear-gradient(180deg, var(--fox-surface-2), rgba(148,163,184,.04)); box-shadow:var(--fox-shadow-sm); overflow:hidden; }
.marketmap-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:10px 12px 7px 12px; border-bottom:1px solid rgba(148,163,184,.16); }
.marketmap-card-title { font-size:.95rem; font-weight:800; color:var(--fox-text); }
.marketmap-card-subtitle { margin-top:2px; font-size:.78rem; color:var(--fox-text-soft); }
.marketmap-card-pill { flex:0 0 auto; border:1px solid var(--fox-border); border-radius:999px; padding:4px 10px; font-size:.76rem; font-weight:750; color:var(--fox-text-soft); background:rgba(148,163,184,.08); }
.marketmap-chart-card .marketmap-chart-host { flex:1 1 auto; min-height:130px; max-height:none; width:100%; align-self:stretch; }
.marketmap-chart-card .marketmap-chart { border:0; border-radius:0; background:transparent; padding:2px 8px 8px 8px; }
.marketmap-grid-host { width:100%; align-self:stretch; border:1px solid var(--fox-border); border-radius:14px; background:var(--fox-surface-2); box-shadow:var(--fox-shadow-sm); padding:8px; }
.marketmap-filter-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex:0 0 auto; min-width:0; margin:0 0 7px 0; }
.marketmap-filter-status { display:flex; align-items:center; gap:8px; min-width:0; margin:0; color:var(--fox-text-soft); }
.marketmap-filter-count { flex:0 0 auto; color:var(--fox-text-soft); font-size:.8rem; font-weight:700; }
.marketmap-filter-chip { display:inline-flex; align-items:center; min-height:26px; padding:3px 10px; border:1px solid var(--fox-border); border-radius:999px; font-size:.78rem; font-weight:800; color:var(--fox-text); background:rgba(148,163,184,.10); }
.marketmap-filter-chip--all { color:var(--fox-primary); border-color:rgba(59,130,246,.35); background:rgba(59,130,246,.12); }
.marketmap-filter-chip--negative { color:var(--fox-negative); border-color:rgba(239,68,68,.42); background:rgba(239,68,68,.12); }
.marketmap-filter-chip--neutral { color:var(--fox-text-soft); border-color:rgba(148,163,184,.34); background:rgba(148,163,184,.10); }
.marketmap-filter-chip--positive { color:var(--fox-positive); border-color:rgba(34,197,94,.42); background:rgba(34,197,94,.12); }
.marketmap-clear-filter { border:0; background:transparent; color:var(--fox-primary); font-size:.78rem; font-weight:800; cursor:pointer; padding:3px 4px; }
.marketmap-clear-filter:hover { text-decoration:underline; }
.marketmap-cell--negative { color:var(--fox-negative); font-weight:700; }
.marketmap-cell--positive { color:var(--fox-positive); font-weight:700; }
.marketmap-cell--neutral { color:var(--fox-text-soft); }
.marketmap-mud-grid { border-radius:11px; overflow:hidden; }
.marketmap-mud-grid .mud-table-head .mud-table-cell { background:var(--fox-surface-2) !important; color:var(--fox-text) !important; }
.marketmap-mud-grid .mud-table-body .mud-table-row:hover .mud-table-cell { background:var(--fox-row-hover-bg, var(--fox-primary-soft)) !important; }
.marketmap-mud-grid .mud-table-head .mud-table-row:hover .mud-table-cell,
.marketmap-mud-grid .mud-table-head .mud-table-cell:hover,
.marketmap-mud-grid .mud-table-head th:hover {
  background:var(--fox-surface-2) !important;
  color:var(--fox-text) !important;
}
@media (max-height: 760px) {
  .marketmap-summary-card { min-height:58px; padding:9px 11px; }
  .marketmap-summary-card__value { font-size:1.12rem; }
  .marketmap-summary-card__hint { margin-top:3px; }
  .marketmap-chart-card { flex-basis:min(34%, 220px); }
  .marketmap-card-header { padding:7px 10px 5px 10px; }
  .marketmap-chart-card .marketmap-chart-host { min-height:105px; }
}
@media (max-width: 900px) {
  .marketmap-summary-strip { grid-template-columns:repeat(2, minmax(130px, 1fr)); }
  .marketmap-filter-toolbar { align-items:flex-start; flex-direction:column; gap:5px; }
}

/* MarketMap responsive pane behavior - build 695
   Keep summary cards visible in normal/full and vertical two-pane layouts.
   Hide them only when the MarketMap pane is genuinely cramped. */
.feature-pane--marketmap {
  container-name: marketmap-pane;
  container-type: size;
}

@container marketmap-pane (max-width: 760px) {
  .feature-pane--marketmap .marketmap-chart-card { flex-basis:min(36%, 245px); }
  .feature-pane--marketmap .marketmap-layout { gap:8px; }
}

@container marketmap-pane (max-height: 420px) {
  .feature-pane--marketmap .marketmap-chart-card { flex-basis:min(34%, 230px); }
  .feature-pane--marketmap .marketmap-layout { gap:8px; }
}

@container marketmap-pane (max-height: 360px) {
  .feature-pane--marketmap .marketmap-chart-card { flex-basis:min(32%, 190px); }
  .feature-pane--marketmap .marketmap-card-header { padding:6px 9px 4px 9px; }
  .feature-pane--marketmap .marketmap-card-subtitle { display:none; }
  .feature-pane--marketmap .marketmap-chart-card .marketmap-chart-host { min-height:88px; }
  .feature-pane--marketmap .marketmap-filter-toolbar { margin-bottom:5px; }
}

/* Fallback layout tightening for browsers without container queries.
   Summary visibility is controlled by the pane resize logic via is-summary-hidden. */
@media (max-width: 760px), (max-height: 420px) {
  .feature-pane--marketmap .marketmap-layout { gap:8px; }
}

/* MarketMap MudDataGrid header/body separation - build 698
   Keep MudDataGrid fixed-header behavior, but prevent body rows from painting
   through/under the compact sticky header when the grid is inside the MarketMap
   card toolbar layout. */
.marketmap-grid-host {
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.marketmap-grid-host .marketmap-filter-toolbar {
  flex:0 0 auto;
}
.marketmap-grid-host .marketmap-mud-grid-wrap {
  flex:1 1 0;
  min-height:120px;
  height:auto;
  overflow:hidden;
}
.marketmap-grid-host .marketmap-mud-grid-wrap .mud-grid-table-inner {
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  overflow:hidden;
}
.marketmap-grid-host .marketmap-mud-grid {
  flex:1 1 auto;
  min-height:0;
  height:100%;
}
.marketmap-mud-grid .mud-table-root {
  border-collapse:separate !important;
  border-spacing:0 !important;
}
.marketmap-mud-grid .mud-table-container {
  height:100% !important;
  max-height:100% !important;
  overflow:auto !important;
}
.marketmap-mud-grid .mud-table-head {
  position:relative;
  z-index:8;
}
.marketmap-mud-grid .mud-table-head .mud-table-cell,
.marketmap-mud-grid .mud-table-head th {
  position:sticky !important;
  top:0 !important;
  z-index:9 !important;
  min-height:32px !important;
  height:32px !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
  background:var(--fox-surface-2) !important;
  box-shadow:inset 0 -1px 0 var(--fox-border-strong, var(--fox-border)) !important;
}
.marketmap-mud-grid .mud-table-body,
.marketmap-mud-grid .mud-table-body .mud-table-row,
.marketmap-mud-grid .mud-table-body .mud-table-cell {
  position:relative;
  z-index:auto;
}

.marketmap-mud-grid .mud-table-head .mud-table-row:hover .mud-table-cell,
.marketmap-mud-grid .mud-table-head .mud-table-cell:hover,
.marketmap-mud-grid .mud-table-head th:hover,
.marketmap-mud-grid .mud-table-head .mud-table-sort-label:hover {
  background:var(--fox-surface-2) !important;
  color:var(--fox-text) !important;
}

/* Split-pane title chrome collapse - build 703 */
.feature-pane__title-row {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  width:100%;
}

.feature-pane__chrome-toggle {
  flex:0 0 auto;
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--fox-border);
  border-radius:999px;
  color:var(--fox-text-soft);
  background:rgba(148,163,184,.08);
  font-size:.9rem;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}

.feature-pane__chrome-toggle-icon {
  width:14px;
  height:14px;
  display:block;
}

.feature-pane__chrome-toggle:hover {
  color:var(--fox-text);
  background:var(--fox-accent-soft);
  border-color:color-mix(in srgb, var(--fox-accent) 45%, var(--fox-border));
}

.sectorperf-title-row,
.marketmap-title-row {
  flex:0 0 auto;
}

.sectorperf-title-status {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--fox-text-soft);
  font-size:.78rem;
  font-weight:700;
}

.marketmap-title-filter {
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  overflow:hidden;
}

.marketmap-title-filter .marketmap-filter-chip {
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-height:22px;
  padding:2px 8px;
}

.marketmap-clear-filter--inline {
  flex:0 0 auto;
  padding:2px 3px;
  font-size:.72rem;
}


.marketmap-title-metric {
  flex:0 0 auto;
  border:1px solid var(--fox-border);
  border-radius:999px;
  padding:2px 9px;
  font-size:.74rem;
  font-weight:800;
  color:var(--fox-text-soft);
  background:rgba(148,163,184,.08);
}

.marketmap-title-count {
  flex:0 0 auto;
  margin-left:auto;
  color:var(--fox-text-soft);
  font-size:.78rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

.feature-pane--marketmap.is-summary-hidden .marketmap-summary-strip {
  display:none !important;
}

.feature-pane--marketmap.is-top-chrome-collapsed .marketmap-chart-card {
  display:flex !important;
  flex-basis:min(34%, 230px);
}

.feature-pane--marketmap.is-top-chrome-collapsed .marketmap-layout {
  gap:6px;
}

.feature-pane--marketmap.is-top-chrome-collapsed .marketmap-grid-host {
  flex:1 1 auto;
  min-height:0;
}

.feature-pane--marketmap.is-top-chrome-collapsed .marketmap-grid-host .marketmap-mud-grid-wrap {
  min-height:0;
}

.sectorperf-root.is-top-chrome-collapsed .sectorperf-layout {
  gap:8px;
}

.sectorperf-root.is-top-chrome-collapsed .sectorperf-panel__title {
  padding-top:7px;
  padding-bottom:7px;
}

/* Seasonality Analysis redesign - build 707 */
.seasonality-root {
  gap:10px;
  padding:10px;
  width:100%;
  max-width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  box-sizing:border-box;
  overflow:hidden;
  background:var(--fox-bg);
  color:var(--fox-text);
  --season-panel: var(--fox-surface);
  --season-panel-soft: var(--fox-surface-2);
  --season-panel-raised: var(--fox-surface-3);
  --season-border: var(--fox-border);
  --season-border-strong: var(--fox-border-strong);
}

.seasonality-header {
  flex:0 0 auto;
  gap:8px;
  min-width:0;
}

.seasonality-title-row {
  flex:0 0 auto;
}

.seasonality-title-stack {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.seasonality-title {
  font-size:1.08rem;
  font-weight:800;
  letter-spacing:.01em;
  line-height:1.15;
}

.seasonality-subtitle {
  color:var(--fox-text-soft);
  font-size:.78rem;
  line-height:1.15;
}

.seasonality-title-scrip {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--fox-text-soft);
  font-size:.78rem;
  font-weight:800;
}

.seasonality-toolbar {
  gap:8px;
  padding:0;
  align-items:center;
  min-width:0;
  overflow-x:auto;
}

.seasonality-root .seasonality-control--scrip-button {
  min-width:64px;
  height:34px;
  padding:0 10px;
  font-size:.78rem;
  font-weight:800;
}

.seasonality-scrip-box {
  flex:0 0 172px;
  width:172px;
  min-width:172px;
  max-width:172px;
  height:34px;
  min-height:34px;
  padding:0 10px;
  border-radius:9px;
  font-size:.84rem;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--fox-control-text);
  background:var(--fox-control-bg);
  border:1px solid var(--fox-control-border);
}

.seasonality-root .seasonality-control--date {
  width:138px;
  min-width:138px;
  max-width:138px;
}

.seasonality-root .seasonality-control--step {
  width:76px;
  min-width:76px;
  max-width:76px;
}

.seasonality-root .mud-input-control {
  margin-top:0;
  margin-bottom:0;
}

.seasonality-root .mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-outlined {
  min-height:34px;
}

.seasonality-root .mud-input-control .mud-input > input,
.seasonality-root .mud-input-control .mud-input-slot {
  font-size:.84rem;
  padding-top:7px;
  padding-bottom:7px;
}

.seasonality-root .mud-input-control .mud-input-label {
  font-size:.76rem;
}

.seasonality-refresh-btn {
  height:34px;
  min-width:92px;
  font-weight:800;
}

.seasonality-status {
  flex:0 0 auto;
  font-size:.8rem;
  color:var(--fox-text-soft);
}

.seasonality-content {
  flex:1 1 auto;
  min-height:0;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:hidden;
}

.seasonality-summary {
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  min-width:0;
}

.seasonality-summary-card {
  min-width:0;
  border:1px solid var(--season-border);
  border-radius:12px;
  background:linear-gradient(135deg, var(--season-panel), var(--season-panel-soft));
  color:var(--fox-text);
  padding:10px 12px;
  box-shadow:var(--fox-shadow-sm);
}

.seasonality-summary-card__label {
  color:var(--fox-text-soft);
  font-size:.78rem;
  font-weight:700;
  margin-bottom:4px;
}

.seasonality-summary-card__value {
  font-size:1.02rem;
  line-height:1.15;
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.seasonality-summary-card__hint {
  margin-top:2px;
  font-size:.82rem;
  line-height:1.15;
  font-weight:800;
  color:var(--fox-text-soft);
}

.positive-text { color:var(--fox-heat-positive-text); }
.negative-text { color:var(--fox-heat-negative-text); }
.seasonality-bias-text { color:var(--fox-primary); }

.seasonality-heatmap-panel,
.seasonality-chart-panel {
  min-width:0;
  border:1px solid var(--season-border);
  border-radius:12px;
  background:var(--season-panel);
  color:var(--fox-text);
  box-shadow:var(--fox-shadow-sm);
}

.seasonality-heatmap-panel {
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.seasonality-heatmap-header {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px 8px 12px;
  min-width:0;
}

.seasonality-heatmap-title-wrap {
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}

.seasonality-heatmap-title {
  font-weight:900;
  font-size:.98rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.seasonality-heatmap-range {
  flex:0 0 auto;
  color:var(--fox-text-soft);
  font-size:.82rem;
  font-weight:700;
}

.seasonality-legend {
  flex:0 1 auto;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:7px;
  align-items:center;
  min-width:0;
}

.seasonality-legend__item {
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  font-size:.78rem;
  font-weight:700;
  color:var(--fox-text-soft);
}

.seasonality-legend__swatch {
  width:14px;
  height:14px;
  border-radius:3px;
  display:inline-block;
  border:1px solid var(--season-border-strong);
  box-shadow:none;
}

.seasonality-legend__label {
  white-space:nowrap;
}

.seasonality-grid-host {
  flex:1 1 auto;
  min-height:0;
  min-width:0;
  overflow:auto;
  padding:0 10px 10px 10px;
}

.seasonality-heatmap {
  width:100%;
  min-width:850px;
  border-collapse:separate;
  border-spacing:0;
  font-variant-numeric:tabular-nums;
  font-size:.86rem;
}

.seasonality-heatmap th,
.seasonality-heatmap td {
  min-width:64px;
  padding:7px 9px;
  text-align:center;
  border-right:1px solid var(--season-border);
  border-bottom:1px solid var(--season-border);
  color:var(--fox-text);
  text-shadow:none;
}

.seasonality-heatmap th:first-child,
.seasonality-heatmap td:first-child {
  min-width:72px;
  text-align:center;
  font-weight:800;
  background:var(--season-panel-soft);
  position:sticky;
  left:0;
  z-index:2;
}

.seasonality-heatmap th {
  position:sticky;
  top:0;
  z-index:3;
  font-weight:900;
  background:var(--fox-table-header-bg);
  color:var(--fox-table-header-text);
  box-shadow:inset 0 -1px 0 var(--season-border-strong);
}

.seasonality-heatmap th:first-child {
  z-index:4;
}

.seasonality-heatmap tr.is-average td {
  font-weight:900;
  background:var(--season-panel-raised) !important;
  border-top:2px solid var(--season-border-strong);
}

.seasonality-cell {
  min-width:64px;
}

.seasonality-chart-panel {
  flex:0 0 170px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:hidden;
}

.seasonality-chart-title {
  flex:0 0 auto;
  font-weight:900;
  font-size:.95rem;
}

.seasonality-chart-host {
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(12, minmax(42px, 1fr));
  gap:6px;
  align-items:stretch;
  border-top:1px dashed var(--season-border);
  padding-top:6px;
  overflow-x:auto;
}

.seasonality-chart-column {
  min-width:42px;
  display:grid;
  grid-template-rows:18px 1fr 18px;
  gap:2px;
  text-align:center;
  font-size:.72rem;
  color:var(--fox-text-soft);
}

.seasonality-chart-value {
  font-weight:800;
  color:var(--fox-text);
}

.seasonality-chart-track {
  position:relative;
  min-height:64px;
  border-bottom:1px solid var(--fox-databar-zero-line);
  background:linear-gradient(to bottom, transparent 49%, var(--fox-databar-zero-line) 50%, transparent 51%);
}

.seasonality-chart-bar {
  position:absolute;
  left:20%;
  right:20%;
  min-height:2px;
  border-radius:3px 3px 0 0;
}

.seasonality-chart-bar--positive { background:var(--fox-databar-positive); }
.seasonality-chart-bar--negative { background:var(--fox-databar-negative); }
.seasonality-chart-month { font-weight:800; color:var(--fox-text); }

.seasonality-root.is-summary-hidden .seasonality-summary,
.seasonality-root.is-chart-hidden .seasonality-chart-panel {
  display:none !important;
}

.seasonality-root.is-top-chrome-collapsed .seasonality-header {
  gap:0;
}

.seasonality-root.is-pane-medium .seasonality-summary-card {
  padding:8px 10px;
}

.seasonality-root.is-pane-medium .seasonality-chart-panel {
  flex-basis:150px;
}

.seasonality-root.is-pane-compact,
.seasonality-root.is-pane-micro {
  gap:7px;
  padding:8px;
}

.seasonality-root.is-pane-compact .seasonality-title,
.seasonality-root.is-pane-micro .seasonality-title {
  font-size:.96rem;
}

.seasonality-root.is-pane-compact .seasonality-toolbar,
.seasonality-root.is-pane-micro .seasonality-toolbar {
  gap:6px;
  flex-wrap:nowrap;
  overflow-x:auto;
}

.seasonality-root.is-pane-compact .seasonality-control--scrip-button,
.seasonality-root.is-pane-micro .seasonality-control--scrip-button,
.seasonality-root.is-pane-compact .seasonality-refresh-btn,
.seasonality-root.is-pane-micro .seasonality-refresh-btn {
  height:30px;
  font-size:.74rem;
}

.seasonality-root.is-pane-compact .seasonality-scrip-box,
.seasonality-root.is-pane-micro .seasonality-scrip-box {
  flex-basis:128px;
  width:128px;
  min-width:128px;
  max-width:128px;
  height:30px;
  min-height:30px;
  font-size:.78rem;
}

.seasonality-root.is-pane-compact .seasonality-control--date,
.seasonality-root.is-pane-micro .seasonality-control--date {
  width:118px;
  min-width:118px;
  max-width:118px;
}

.seasonality-root.is-pane-compact .seasonality-control--step,
.seasonality-root.is-pane-micro .seasonality-control--step {
  width:68px;
  min-width:68px;
  max-width:68px;
}

.seasonality-root.is-pane-compact .mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-outlined,
.seasonality-root.is-pane-micro .mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-outlined {
  min-height:30px;
}

.seasonality-root.is-pane-compact .mud-input-control .mud-input > input,
.seasonality-root.is-pane-compact .mud-input-control .mud-input-slot,
.seasonality-root.is-pane-micro .mud-input-control .mud-input > input,
.seasonality-root.is-pane-micro .mud-input-control .mud-input-slot {
  font-size:.78rem;
  padding-top:5px;
  padding-bottom:5px;
}

.seasonality-root.is-pane-compact .seasonality-heatmap-header,
.seasonality-root.is-pane-micro .seasonality-heatmap-header {
  padding:8px 9px 6px 9px;
  gap:7px;
  align-items:flex-start;
}

.seasonality-root.is-pane-compact .seasonality-heatmap-title-wrap,
.seasonality-root.is-pane-micro .seasonality-heatmap-title-wrap {
  display:none;
}

.seasonality-root.is-pane-compact .seasonality-legend,
.seasonality-root.is-pane-micro .seasonality-legend {
  justify-content:flex-start;
  overflow-x:auto;
  flex-wrap:nowrap;
  max-width:100%;
}

.seasonality-root.is-pane-compact .seasonality-legend__item,
.seasonality-root.is-pane-micro .seasonality-legend__item {
  font-size:.72rem;
}

.seasonality-root.is-pane-compact .seasonality-grid-host,
.seasonality-root.is-pane-micro .seasonality-grid-host {
  padding:0 8px 8px 8px;
}

.seasonality-root.is-pane-compact .seasonality-heatmap,
.seasonality-root.is-pane-micro .seasonality-heatmap {
  min-width:780px;
  font-size:.80rem;
}

.seasonality-root.is-pane-compact .seasonality-heatmap th,
.seasonality-root.is-pane-compact .seasonality-heatmap td,
.seasonality-root.is-pane-micro .seasonality-heatmap th,
.seasonality-root.is-pane-micro .seasonality-heatmap td {
  min-width:58px;
  padding:6px 7px;
}

.seasonality-root.is-pane-micro .seasonality-heatmap-header {
  flex-direction:column;
}

.fox-error-boundary {
    margin: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--fox-border);
    border-radius: 12px;
    background: var(--fox-surface);
    color: var(--fox-text);
    box-shadow: var(--fox-shadow-sm);
}
.fox-error-boundary__title { font-weight: 700; margin-bottom: 0.25rem; }
.fox-error-boundary__text { color: var(--fox-text-muted); font-size: 0.86rem; line-height: 1.35; }
.fox-error-boundary__button {
    margin-top: 0.65rem;
    border: 1px solid var(--fox-border-strong);
    border-radius: 999px;
    background: var(--fox-bg);
    color: var(--fox-text);
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    cursor: pointer;
}
