/* Wright page-specific styles — load after wright-theme.css (font: base.html) */

/* ========== create_strategy.html ========== */

.text-truncate {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.editable-strategy-name:hover {
background-color: var(--bg-muted);
border-radius: var(--radius-sm);
}

.action-icon {
cursor: pointer;
margin: 0 2px;
}

#strategy-detail-tabs .nav-link {
font-size: 0.8125rem;
padding: 0.45rem 0.65rem;
}
@media (min-width: 992px) {
#strategy-detail-tabs .nav-link {
font-size: 0.875rem;
padding: 0.5rem 0.85rem;
}
}
#strategy-detail-tab-content .chart-area {
min-height: 300px;
background: #ffffff;
border-radius: 16px;
border: 1px solid var(--border-default);
padding: 14px 12px 8px;
margin-bottom: 0.5rem;
box-shadow: 0 4px 14px rgba(30, 12, 28, 0.06);
position: relative;
}
/* —— Cleaner tables (strategy detail tabs only) —— */
#strategy-detail-tab-content .table-responsive {
border: 1px solid var(--border-default);
border-radius: 12px;
overflow: hidden;
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(30, 12, 28, 0.04);
}
#strategy-detail-tab-content .table {
margin-bottom: 0;
font-size: 0.8125rem;
color: var(--text-secondary);
border-collapse: collapse;
}
#strategy-detail-tab-content .table thead th,
#strategy-detail-tab-content .table thead.table-light th {
background: var(--bg-page) !important;
color: var(--text-muted) !important;
font-weight: 600;
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.07em;
border: none !important;
border-bottom: 1px solid var(--border-default) !important;
padding: 0.65rem 0.9rem;
vertical-align: middle;
white-space: nowrap;
}
#strategy-detail-tab-content .table tbody td {
border: none !important;
border-top: 1px solid var(--border-light) !important;
padding: 0.55rem 0.9rem;
vertical-align: middle;
}
#strategy-detail-tab-content .table tbody tr:first-child td {
border-top: none !important;
}
#strategy-detail-tab-content .table tbody tr:hover td {
background-color: var(--bg-page);
}
#strategy-detail-tab-content .table.table-bordered,
#strategy-detail-tab-content .table.table-bordered th,
#strategy-detail-tab-content .table.table-bordered td {
border: none !important;
}
#strategy-detail-tab-content .table.table-bordered tbody td {
border-top: 1px solid var(--border-light) !important;
}
#strategy-detail-tab-content .table.table-bordered tbody tr:first-child td {
border-top: none !important;
}
#strategy-detail-tab-content .table-striped tbody tr:nth-of-type(odd) {
background-color: transparent;
}
#strategy-detail-tab-content .table-striped tbody tr:nth-of-type(even) {
background-color: var(--bg-page);
}
#strategy-detail-tab-content .table-striped tbody tr:hover td {
background-color: var(--accent-active-faint) !important;
}
#strategy-detail-tab-content #monthlyHeatmapTable table {
font-size: 0.75rem;
}
#strategy-detail-tab-content #monthlyHeatmapTable .table {
border-radius: 0;
}
#strategy-detail-tab-content.position-relative {
min-height: 220px;
}
#strategy-detail-loading {
position: absolute;
inset: 0;
z-index: 20;
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 0.75rem;
padding: 1.5rem;
background: rgba(255, 255, 255, 0.92);
border-radius: 0 0 0.25rem 0.25rem;
text-align: center;
}
#strategy-detail-loading.strategy-detail-loading--visible {
display: flex;
}
#strategy-detail-tab-content #regime-analysis-container {
border: 1px solid var(--border-default);
border-radius: 12px;
overflow: hidden;
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(30, 12, 28, 0.04);
}
#strategy-detail-tab-content #regime-analysis-container .card-header {
background: var(--bg-page) !important;
border-bottom: 1px solid var(--border-default);
padding: 0.75rem 1rem;
}
#strategy-detail-tab-content #regime-analysis-container .card-header h5 {
font-size: 0.8rem;
font-weight: 600;
color: var(--text-secondary);
margin: 0;
}
#strategy-detail-tab-content #regime-analysis-container .card-body {
padding: 1rem;
}
/* Regime stats tables: allow header wrap (global thead rule uses nowrap and squishes columns) */
#strategy-detail-tab-content #regime-analysis-content .table thead th {
white-space: normal;
line-height: 1.25;
min-width: 4.25rem;
vertical-align: bottom;
}

#strategy-detail-tab-content #regime-analysis-content .regime-analysis-section-title {
font-size: 0.8125rem;
font-weight: 600;
color: var(--text-secondary);
letter-spacing: 0.02em;
text-transform: none;
margin-top: 0.25rem;
}

#strategy-detail-tab-content #regime-analysis-content .regime-stats-table tbody tr {
background-color: var(--bg-white) !important;
}

#strategy-detail-tab-content #regime-analysis-content .regime-stats-table tbody tr:nth-child(even) {
background-color: var(--bg-page) !important;
}

#strategy-detail-tab-content #regime-analysis-content .regime-stats-table tbody td {
color: var(--text-secondary);
}

#strategy-detail-tab-content #regime-analysis-content .regime-stats-table tbody td.regime-stats-regime-cell {
color: var(--text-primary);
font-weight: 600;
}
#strategy-detail-tab-content #task-detail #detail-content > table.table {
border: 1px solid var(--border-default);
border-radius: 12px;
overflow: hidden;
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(30, 12, 28, 0.04);
}

/* —— Strategy analytics dashboard (reference-inspired) —— */
.strategy-analytics-dashboard {
border-radius: 1.25rem;
overflow: hidden;
box-shadow: 0 4px 24px rgba(30, 12, 28, 0.08);
font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
.strategy-analytics-dashboard--embedded {
border-radius: 0.75rem;
font-family: inherit;
}
.strategy-analytics-dashboard--embedded .strategy-analytics-card-body {
padding-top: 1rem;
}
.strategy-analytics-sidebar {
background: #ffffff;
position: relative;
min-height: 280px;
}
.strategy-analytics-sidebar::after {
content: '\f201';
font-family: 'Font Awesome 5 Free';
font-weight: 900;
position: absolute;
right: -1rem;
bottom: -2rem;
font-size: 11rem;
color: rgba(87, 152, 136, 0.06);
pointer-events: none;
line-height: 1;
}
.strategy-analytics-sidebar-inner {
position: relative;
z-index: 1;
padding: 2rem 1.75rem;
height: 100%;
}
.strategy-analytics-icon-wrap {
width: 2.5rem;
height: 2.5rem;
border-radius: 0.65rem;
background: rgba(87, 152, 136, 0.2);
color: var(--success-green);
display: flex;
align-items: center;
justify-content: center;
font-size: 1.1rem;
margin-bottom: 1.25rem;
}
.strategy-analytics-title {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.02em;
line-height: 1.25;
margin-bottom: 0.75rem;
}
.strategy-analytics-lead {
font-size: 0.9rem;
color: var(--text-muted);
line-height: 1.55;
margin-bottom: 1.25rem;
}
.strategy-analytics-features {
list-style: none;
padding: 0;
margin: 0;
font-size: 0.875rem;
color: var(--text-secondary);
}
.strategy-analytics-features li {
position: relative;
padding-left: 1.35rem;
margin-bottom: 0.65rem;
line-height: 1.4;
}
.strategy-analytics-features li::before {
content: '';
position: absolute;
left: 0;
top: 0.45rem;
width: 0.45rem;
height: 0.45rem;
border-radius: 50%;
background: var(--brand-teal);
box-shadow: 0 0 0 3px rgba(87, 152, 136, 0.25);
}
.strategy-analytics-main {
background: var(--bg-white);
}
.strategy-analytics-main-header {
padding: 1.25rem 1.5rem 0.5rem;
border-bottom: 1px solid var(--border-light);
}
.strategy-analytics-results-label {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
}
.strategy-analytics-back-btn {
border-radius: 999px;
padding: 0.35rem 1rem;
font-weight: 500;
border: 1px solid var(--border-default);
background: var(--bg-white);
color: var(--text-secondary);
}
.strategy-analytics-back-btn:hover {
background: var(--bg-page);
color: var(--text-primary);
border-color: var(--border-strong);
}
.strategy-kpi-card {
position: relative;
border-radius: 1rem;
padding: 1.1rem 1.25rem;
border: 1px solid var(--border-light);
background: var(--bg-page);
overflow: hidden;
min-height: 5.5rem;
}
.strategy-kpi-card--alpha {
background: linear-gradient(135deg, rgba(150, 221, 204, 0.4) 0%, var(--bg-white) 70%);
border-color: rgba(150, 221, 204, 0.5);
}
.strategy-kpi-card--dd {
background: linear-gradient(135deg, rgba(184, 131, 42, 0.15) 0%, var(--bg-white) 70%);
border-color: rgba(184, 131, 42, 0.35);
}
.strategy-kpi-label {
font-size: 0.65rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
margin-bottom: 0.35rem;
}
.strategy-kpi-hint {
font-weight: 500;
text-transform: none;
letter-spacing: 0;
color: var(--border-strong);
}
.strategy-kpi-value {
font-size: 1.65rem;
font-weight: 700;
color: var(--success-green);
letter-spacing: -0.02em;
line-height: 1.1;
}
.strategy-kpi-value--risk {
color: var(--warning-orange);
}
.strategy-kpi-value--muted {
color: var(--text-muted);
font-size: 1.25rem;
}
.strategy-kpi-icon {
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
width: 2.25rem;
height: 2.25rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.95rem;
}
.strategy-kpi-card--alpha .strategy-kpi-icon {
background: rgba(87, 152, 136, 0.15);
color: var(--success-green);
}
.strategy-kpi-card--dd .strategy-kpi-icon {
background: rgba(184, 131, 42, 0.12);
color: var(--warning-orange);
}
.strategy-kpi-card--gross-cagr {
background: linear-gradient(135deg, var(--primary-blue-faint) 0%, var(--bg-white) 72%);
border-color: var(--primary-blue-light);
}
.strategy-kpi-card--gross-cagr .strategy-kpi-icon {
background: rgba(213, 123, 200, 0.12);
color: var(--primary-blue-dark);
}
.worst-dd-perf-chart-area {
position: relative;
height: 220px;
}
.strategy-analytics-card-body {
background: var(--bg-white);
border: none;
padding-top: 0.75rem;
}
.strategy-analytics-dashboard #strategy-detail-tabs {
border: none;
gap: 0.35rem;
padding: 0 0.25rem;
flex-wrap: wrap;
}
.strategy-analytics-dashboard #strategy-detail-tabs .nav-item {
margin-bottom: 0.25rem;
}
.strategy-analytics-dashboard #strategy-detail-tabs .nav-link {
border: none !important;
border-radius: 999px !important;
color: var(--text-muted) !important;
background: var(--bg-subtle) !important;
font-weight: 500;
font-size: 0.78rem;
padding: 0.4rem 0.85rem !important;
margin-right: 0;
}
.strategy-analytics-dashboard #strategy-detail-tabs .nav-link:hover {
background: var(--border-default) !important;
color: var(--text-secondary) !important;
}
.strategy-analytics-dashboard #strategy-detail-tabs .nav-link.active {
background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark)) !important;
color: var(--on-primary) !important;
box-shadow: 0 2px 8px rgba(213, 123, 200, 0.35);
}
.strategy-analytics-dashboard #strategy-detail-tab-content {
border: 1px solid var(--border-light) !important;
border-radius: 1rem;
background: var(--bg-page);
margin-top: 0.75rem;
padding: 1.25rem !important;
}
.strategy-analytics-dashboard--embedded #strategy-detail-tabs .nav-link {
border-radius: 999px !important;
background: var(--bg-subtle) !important;
color: var(--text-muted) !important;
border: none !important;
font-size: 0.8125rem;
}
.strategy-analytics-dashboard--embedded #strategy-detail-tab-content {
border-radius: 0.5rem;
background: var(--bg-white);
}
@media (max-width: 991.98px) {
.strategy-analytics-sidebar {
min-height: auto;
}
}

/* ========== scheme_allocation.html ========== */

/* Allocation table container */
.allocation-table-wrap {
border-radius: 0.5rem;
overflow: hidden;
box-shadow: 0 2px 8px rgba(213, 123, 200, 0.12);
border: 1px solid var(--primary-blue-light);
}

.allocation-table {
margin-bottom: 0;
font-size: 0.8rem;
}
.allocation-table thead th {
background: linear-gradient(180deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
color: var(--on-primary);
font-weight: 600;
text-transform: uppercase;
font-size: 0.8rem;
letter-spacing: 0.02em;
padding: 0.4rem 0.75rem;
border-bottom: none;
border-top: none;
white-space: nowrap;
}
.allocation-table thead th.col-weight {
text-align: left;
}
.allocation-table tbody td {
padding: 0.35rem 0.75rem;
vertical-align: middle;
border-bottom: 1px solid var(--border-subtle);
color: var(--text-primary);
font-size: 0.8rem;
}
.allocation-table tbody tr:hover td {
background-color: var(--accent-active-faint) !important;
}
.allocation-table tbody tr:nth-of-type(even) {
background-color: var(--pastel-icy-blue);
}
.allocation-table tbody tr:nth-of-type(odd) {
background-color: var(--bg-white);
}
.allocation-table .col-check { width: 2.5rem; text-align: center; }
.allocation-table .col-name { min-width: 140px; }
.allocation-table .col-ticker { min-width: 90px; }
.allocation-table .col-weight {
text-align: right;
min-width: 110px;
}
.allocation-table tbody td:nth-child(4) {
width: 100px;
max-width: 100px;
}
.allocation-table tbody td:nth-child(4),
.allocation-table tbody td:nth-child(5),
.allocation-table tbody td:nth-child(6) {
text-align: left;
}

.weight-input {
width: 80px;
text-align: left;
padding: 0.2rem 0.4rem;
font-size: 0.8rem;
font-weight: 500;
border-radius: 0.25rem;
border: 1px solid var(--primary-blue-light);
background-color: var(--pastel-icy-blue);
}
.weight-input:focus {
border-color: var(--primary-blue);
background-color: var(--bg-white);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.2);
}
/* Zero weight: same box style as others, neutral color (no green/red) */
.weight-zero .weight-input,
.weight-zero .weight-display {
background-color: var(--bg-subtle);
border: 1px solid var(--border-default);
color: var(--text-secondary);
padding: 0.2rem 0.4rem;
border-radius: 0.25rem;
width: 80px;
box-sizing: border-box;
font-size: 0.8rem;
font-weight: 500;
font-variant-numeric: tabular-nums;
}
.weight-zero .weight-display {
display: inline-block;
text-align: left;
}

.weight-display {
font-size: 0.8rem;
font-weight: 500;
color: var(--text-primary);
background-color: var(--accent-active-faint);
padding: 0.2rem 0.4rem;
border: 1px solid var(--primary-blue-light);
border-radius: 0.25rem;
display: inline-block;
width: 80px;
box-sizing: border-box;
text-align: left;
font-variant-numeric: tabular-nums;
}
/* Portfolio Weight column: plain text, no box (read-only) */
.portfolio-weight-display {
font-size: 0.8rem;
font-weight: 500;
color: var(--text-primary);
font-variant-numeric: tabular-nums;
}
/* Neutral style when portfolio or actual weight value is 0 (no red/green) */
.portfolio-weight-neutral .portfolio-weight-display {
color: var(--text-secondary);
}
.actual-weight-neutral .actual-weight-display {
background-color: var(--bg-subtle);
border-color: var(--border-default);
color: var(--text-secondary);
}

/* Conditional formatting (kept) */
.actual-weight-over .actual-weight-display {
color: var(--success-green);
font-weight: 600;
}
.actual-weight-under .actual-weight-display {
color: var(--danger-red);
font-weight: 600;
}
.portfolio-weight-over .portfolio-weight-display {
color: var(--success-green);
font-weight: 600;
}
.portfolio-weight-under .portfolio-weight-display {
color: var(--danger-red);
font-weight: 600;
}

.portfolio-only-row {
background-color: var(--bg-page) !important;
}
.portfolio-only-row td {
color: var(--text-primary);
}
.portfolio-only-row .weight-display {
background-color: var(--bg-subtle);
border-color: var(--border-default);
color: var(--text-secondary);
}
.portfolio-only-row .portfolio-weight-display {
color: var(--text-secondary);
}
.portfolio-only-row:hover td {
background-color: var(--border-subtle) !important;
}

.badge { font-size: 0.9em; }
.modal-header {
background-color: var(--accent-active-faint);
border-bottom: 1px solid var(--primary-blue-light);
}
.btn { margin-right: 5px; }

#tickerSearchResults {
max-height: 200px;
overflow-y: auto;
border: 1px solid var(--border-default);
border-radius: 4px;
padding: 10px;
}
.search-result-item {
padding: 5px;
cursor: pointer;
border-bottom: 1px solid var(--border-light);
}
.search-result-item:hover {
background-color: var(--bg-page);
}
.search-result-item:last-child {
border-bottom: none;
}

/* ========== upload_portfolio_weights.html ========== */

.upload-container {
max-width: 800px;
margin: 0 auto;
}
.upload-card {
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
border: 1px solid var(--border-default);
border-radius: 0.35rem;
}
.upload-container .form-group {
margin-bottom: 1.5rem;
}
.upload-container .file-upload-area {
border: 2px dashed var(--border-default);
border-radius: 0.35rem;
padding: 2rem;
text-align: center;
background-color: var(--bg-page);
transition: border-color 0.2s ease, background-color 0.2s ease;
}
.upload-container .file-upload-area:hover {
border-color: var(--text-secondary);
background-color: var(--accent-active-faint);
}
.upload-container .file-upload-area.dragover {
border-color: var(--primary-blue);
background-color: var(--bg-muted);
}
.upload-container .file-input-label {
cursor: pointer;
color: var(--primary-blue);
font-weight: 600;
}
.upload-container .file-input-label:hover {
color: var(--primary-blue-dark);
}
.upload-container .alert {
border-radius: 0.35rem;
margin-bottom: 1.5rem;
}
.upload-container .example-csv {
background-color: var(--bg-page);
border: 1px solid var(--border-default);
border-radius: 0.35rem;
padding: 1rem;
margin-top: 1rem;
}
.upload-container .example-csv code {
display: block;
white-space: pre;
font-size: 0.875rem;
}
.upload-container .help-text {
font-size: 0.875rem;
color: var(--text-muted);
margin-top: 0.5rem;
}
.upload-container .required-field::after {
content: " *";
color: var(--danger-red);
}

/* ========== vltr_dashboard.html ========== */

.chart-container {
position: relative;
height: 300px;
margin-bottom: 1rem;
}
.indicator-card {
margin-bottom: 1.5rem;
}

/* ========== subindustry_details.html ========== */

/* Time period selector styling */
#subindustryTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#subindustryTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== stock_detail.html ========== */

/* Time period selector styling */
#stockTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#stockTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


#priceLineChart,
#returnsBarChart,
#factorRadar {
max-width: 100%;
height: 200px;
}

#stockTable td {
font-weight: 300;
font-size: 0.8rem;
}

#newsTable td.expandable {
max-width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}

#newsTable td.expandable.expanded {
max-width: none;
white-space: normal;
word-wrap: break-word;
}

/* ========== screener.html ========== */

#dslInput {
width: 100%;
border-radius: 0.5rem;
border: 1px solid var(--border-default);
padding: 0.75em;
font-size: 1.05em;
margin-top: 1em;
margin-bottom: 0.5em;
background: var(--bg-page);
transition: border 0.2s;
}
#dslInput:focus {
border: 1.5px solid var(--primary-blue);
outline: none;
background: var(--bg-white);
}
#dslSuggestions {
border-radius: 0.5rem;
border: 1px solid var(--border-default);
box-shadow: 0 2px 12px rgba(30, 12, 28, 0.08);
font-size: 1em;
margin-top: 0.2em;
}
#dslSuggestions .list-group-item {
cursor: pointer;
transition: background 0.15s;
}
#dslSuggestions .list-group-item:hover {
background: var(--bg-subtle);
}

#resultsTable {
background: var(--bg-white);
border-radius: 0.5rem;
overflow: hidden;
margin-top: 1.5em;
font-size: 1em;
}
#resultsTable th {
background: var(--bg-subtle);
color: var(--text-primary);
font-weight: 600;
border-bottom: 2px solid var(--bg-subtle);
}
#resultsTable td {
vertical-align: middle;
}

/* DataTables scrollX: keep header table same width as body (fixes column drift vs thead) */
#resultsTable_wrapper.dataTables_wrapper .dataTables_scrollHeadInner {
width: 100% !important;
}
#resultsTable_wrapper.dataTables_wrapper .dataTables_scrollHeadInner table,
#resultsTable_wrapper.dataTables_wrapper .dataTables_scrollBody table {
margin-bottom: 0 !important;
border-collapse: collapse !important;
}
#resultsTable_wrapper.dataTables_wrapper .dataTables_scrollHead thead th,
#resultsTable_wrapper.dataTables_wrapper .dataTables_scrollBody tbody td {
box-sizing: border-box;
}

.screener-loading {
align-items: center;
display: flex;
gap: 0.5rem;
padding: 0.75rem 0;
}
.screener-loading .spinner-border {
flex-shrink: 0;
}
.saved-screener {
background: var(--bg-page);
border: 1px solid var(--border-default);
border-radius: 0.5rem;
padding: 0.75em 1em;
margin-bottom: 0.5em;
box-shadow: 0 1px 4px rgba(30, 12, 28, 0.03);
}
.saved-screener b {
color: var(--primary-blue);
}
@media (max-width: 768px) {
.container {
padding: 0 0.5em;
}
#dslInput {
font-size: 0.95em;
}
.btn {
width: 100%;
margin-bottom: 0.5em;
}
}

/* ========== sector_details.html ========== */

/* Time period selector styling */
#sectorTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#sectorTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== recent_news.html ========== */

#news-table td:nth-child(2) {
white-space: normal;
word-wrap: break-word;
max-width: 200px; /* Set a maximum width for the column */
}

/* ========== prod_strategies.html ========== */

:root {
--prod-accent: var(--primary-blue);
--prod-accent-hover: var(--primary-blue-dark);
--prod-success: var(--success-green);
--prod-success-hover: var(--success-green-dark);
--prod-muted: var(--text-muted);
--prod-border: var(--border-default);
--prod-bg-subtle: var(--bg-page);
--prod-card-radius: 0.5rem;
}
.prod-strategies-page .page-header {
padding: 1.25rem 0;
margin-bottom: 1.5rem;
border-bottom: 1px solid var(--prod-border);
}
.prod-strategies-page .page-header h1 {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 0.25rem 0;
letter-spacing: -0.02em;
}
.prod-strategies-page .page-header .lead {
font-size: 0.9rem;
color: var(--prod-muted);
margin: 0;
}
.prod-strategies-page .toolbar-card {
border-radius: var(--prod-card-radius);
border: 1px solid var(--prod-border);
box-shadow: 0 1px 3px rgba(30, 12, 28, 0.04);
margin-bottom: 1.5rem;
}
.prod-strategies-page .toolbar-card .card-body {
padding: 1rem 1.25rem;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem;
}
.prod-strategies-page .btn-refresh {
background: var(--prod-accent);
color: var(--on-primary);
border: none;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-weight: 500;
font-size: 0.875rem;
transition: background 0.15s ease;
}
.prod-strategies-page .btn-refresh:hover { background: var(--prod-accent-hover); color: var(--on-primary); }
.prod-strategies-page .btn-run-all {
background: var(--prod-success);
color: var(--on-primary);
border: none;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-weight: 500;
font-size: 0.875rem;
transition: background 0.15s ease;
}
.prod-strategies-page .btn-run-all:hover { background: var(--prod-success-hover); color: var(--on-primary); }
.prod-strategies-page .btn-clear-data-toggle {
background: var(--bg-white);
color: var(--prod-muted);
border: 1px solid var(--prod-border);
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-size: 0.875rem;
transition: border-color 0.15s ease, color 0.15s ease;
}
.prod-strategies-page .btn-clear-data-toggle:hover {
border-color: var(--prod-muted);
color: var(--text-secondary);
}
.prod-strategies-page #globalStatus { font-size: 0.8125rem; color: var(--prod-muted); }
.prod-strategies-page .clear-data-form {
display: none;
margin-top: 0.75rem;
padding: 1rem;
background: var(--prod-bg-subtle);
border-radius: 0.375rem;
border: 1px solid var(--prod-border);
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
width: 100%;
}
.prod-strategies-page .clear-data-form.visible { display: flex; }
.prod-strategies-page .clear-data-form input[type="date"] {
padding: 0.4rem 0.6rem;
border-radius: 0.375rem;
border: 1px solid var(--prod-border);
font-size: 0.875rem;
}
.prod-strategies-page .clear-data-form .btn-clear {
background: var(--danger-red);
color: var(--on-primary);
border: none;
padding: 0.4rem 0.875rem;
border-radius: 0.375rem;
font-weight: 500;
font-size: 0.875rem;
transition: background 0.15s ease;
}
.prod-strategies-page .clear-data-form .btn-clear:hover { background: var(--danger-red-dark); color: var(--on-primary); }
.prod-strategies-page .strategy-card {
border-radius: var(--prod-card-radius);
border: 1px solid var(--prod-border);
box-shadow: 0 1px 3px rgba(30, 12, 28, 0.04);
margin-bottom: 1.25rem;
overflow: hidden;
}
.prod-strategies-page .strategy-card .card-header {
background: var(--bg-white);
border-bottom: 1px solid var(--prod-border);
padding: 1rem 1.25rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
}
.prod-strategies-page .strategy-card .card-header-title {
font-size: 1.0625rem;
font-weight: 600;
color: var(--text-primary);
margin: 0 0 0.15rem 0;
}
.prod-strategies-page .strategy-card .card-header-key {
font-size: 0.75rem;
color: var(--prod-muted);
font-family: ui-monospace, monospace;
}
.prod-strategies-page .strategy-card .card-body { padding: 1rem 1.25rem; }
.prod-strategies-page .params-toggle {
display: flex;
align-items: center;
padding: 0.5rem 0;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.875rem;
border-radius: 0.375rem;
transition: background 0.15s ease;
}
.prod-strategies-page .params-toggle:hover { background: var(--prod-bg-subtle); color: var(--text-primary); }
.prod-strategies-page .params-toggle .chevron {
margin-left: auto;
transition: transform 0.2s ease;
font-size: 0.7rem;
color: var(--prod-muted);
}
.prod-strategies-page .params-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.prod-strategies-page .params-panel {
background: var(--prod-bg-subtle);
border-radius: 0.375rem;
border: 1px solid var(--prod-border);
padding: 1rem;
margin-bottom: 1rem;
}
.prod-params-form .form-group label {
font-weight: 600;
font-size: 0.8125rem;
color: var(--text-secondary);
margin-bottom: 0.25rem;
display: block;
}
.prod-params-form .form-group { margin-bottom: 1rem; }
.prod-params-form .form-control {
font-size: 0.875rem;
border-radius: 0.375rem;
border: 1px solid var(--prod-border);
padding: 0.45rem 0.6rem;
}
.prod-params-form .form-control:focus {
border-color: var(--prod-accent);
box-shadow: 0 0 0 3px rgba(213, 123, 200, 0.12);
}
.prod-params-form .form-check-label { font-weight: 500; font-size: 0.875rem; color: var(--text-secondary); }
.prod-params-form .params-section-title {
font-size: 0.6875rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--prod-muted);
margin: 1rem 0 0.5rem;
padding-bottom: 0.35rem;
border-bottom: 1px solid var(--prod-border);
}
.prod-params-form .params-section-title:first-child { margin-top: 0; }
.prod-strategies-page .strategy-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 0;
border-top: 1px solid var(--prod-border);
margin-top: 0.25rem;
}
.prod-strategies-page .strategy-actions .btn {
font-weight: 500;
font-size: 0.875rem;
padding: 0.45rem 1rem;
border-radius: 0.375rem;
border: none;
transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.prod-strategies-page .strategy-actions .btn:hover { transform: translateY(-1px); }
.prod-strategies-page .strategy-actions .btn-save {
background: var(--prod-accent);
color: var(--on-primary);
box-shadow: 0 1px 2px rgba(213, 123, 200, 0.25);
}
.prod-strategies-page .strategy-actions .btn-save:hover { background: var(--prod-accent-hover); color: var(--on-primary); }
.prod-strategies-page .strategy-actions .btn-run {
background: var(--prod-success);
color: var(--on-primary);
box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.prod-strategies-page .strategy-actions .btn-run:hover { background: var(--prod-success-hover); color: var(--on-primary); }
.prod-strategies-page .strategy-actions .btn-reset {
background: var(--bg-white);
color: var(--prod-muted);
border: 1px solid var(--prod-border);
}
.prod-strategies-page .strategy-actions .btn-reset:hover { background: var(--prod-bg-subtle); color: var(--text-secondary); }
.prod-strategies-page .card-meta {
font-size: 0.75rem;
color: var(--prod-muted);
margin-top: 0.5rem;
}
.prod-strategies-page .active-toggle { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8125rem; color: var(--prod-muted); }
.prod-strategies-page .active-toggle input { cursor: pointer; }

/* ========== rebalancer.html ========== */

/* Prevent text wrapping and optimize table layout */
.table-responsive table {
white-space: nowrap;
}

.table-responsive th,
.table-responsive td {
white-space: nowrap;
padding: 0.5rem 0.3rem;
vertical-align: middle;
}

/* Optimize column widths */
.table-responsive th:nth-child(1),
/* Ticker */
.table-responsive td:nth-child(1) {
min-width: 80px;
max-width: 80px;
}

.table-responsive th:nth-child(2),
/* Current Weight */
.table-responsive td:nth-child(2),
.table-responsive th:nth-child(3),
/* New Weight */
.table-responsive td:nth-child(3) {
min-width: 90px;
max-width: 90px;
}

.table-responsive th:nth-child(4),
/* Sector */
.table-responsive td:nth-child(4) {
min-width: 120px;
max-width: 120px;
}

.table-responsive th:nth-child(5),
/* Day */
.table-responsive td:nth-child(5),
.table-responsive th:nth-child(6),
/* Week */
.table-responsive td:nth-child(6),
.table-responsive th:nth-child(7),
/* Month */
.table-responsive td:nth-child(7),
.table-responsive th:nth-child(8) {
/* Qtr */
min-width: 60px;
max-width: 60px;
}

.table-responsive th:nth-child(9),
/* Focus Factor */
.table-responsive td:nth-child(9) {
min-width: 100px;
max-width: 100px;
}

.table-responsive th:nth-child(10),
/* Market Cap */
.table-responsive td:nth-child(10) {
min-width: 100px;
max-width: 100px;
}

.table-responsive th:nth-child(11),
/* Valuations */
.table-responsive td:nth-child(11),
.table-responsive th:nth-child(12),
/* Momentum */
.table-responsive td:nth-child(12),
.table-responsive th:nth-child(13),
/* Revisions */
.table-responsive td:nth-child(13),
.table-responsive th:nth-child(14) {
/* Targets */
min-width: 80px;
max-width: 80px;
}

.table-responsive th:nth-child(15),
/* Days to Earnings */
.table-responsive td:nth-child(15) {
min-width: 120px;
max-width: 120px;
}

.table-responsive th:nth-child(16),
/* Warnings */
.table-responsive td:nth-child(16) {
min-width: 70px;
max-width: 70px;
}

/* Ensure horizontal scroll works properly */
.table-responsive {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

/* DataTables scrollX: header lives in .dataTables_scrollHead; keep it visible */
.table-responsive .dataTables_scrollHead {
overflow: visible !important;
}
.table-responsive .dataTables_scrollHeadInner {
width: 100% !important;
padding-right: 0;
}
.table-responsive .dataTables_scrollHeadInner table {
width: 100% !important;
margin-bottom: 0;
}
.table-responsive .dataTables_scrollHead thead th {
background: var(--bg-page);
color: var(--text-primary);
font-weight: 600;
border-bottom: 1px solid var(--border-default);
padding: 0.5rem 0.3rem;
white-space: nowrap;
}

/* ========== portfolio_metrics.html ========== */

.pms-portfolio {
color: blue;
}

.factor-portfolio {
color: black;
}
  
/* Factor portfolio table styling */
#factorPortfolioTable {
border-color: var(--pastel-icy-blue);
}
  
#factorPortfolioTable thead th {
background-color: var(--pastel-icy-blue);
border-color: var(--primary-blue-light);
}
  
#factorPortfolioTable tbody tr {
background-color: var(--bg-page);
}
  
#factorPortfolioTable tbody tr:hover {
background-color: rgba(87, 152, 136, 0.14);
}

/* ========== portfolio_details.html ========== */

td.dt-control {
background: url('https://www.datatables.net/examples/resources/details_open.png') no-repeat center center;
cursor: pointer;
}
tr.shown td.dt-control {
background: url('https://www.datatables.net/examples/resources/details_close.png') no-repeat center center;
}

/* Time period selector styling */
#portfolioTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#portfolioTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}

/* Portfolio time period label styling */
#portfolioTimePeriodSelect + label {
font-size: 0.875rem;
margin-bottom: 0.25rem;
}

/* Suggestion dropdowns (list-group or stockSuggestions); use .wp-hidden when toggled via el.style.display */
.wp-hidden {
display: none;
}

.wp-select-w-auto {
width: auto;
}

.wp-overflow-x-auto {
overflow-x: auto;
}

/* ========== scheme_allocation.html / earnings_dashboard ========== */

.wp-page-wide {
max-width: 1920px;
margin-left: auto;
margin-right: auto;
}

.wp-answer-min-h {
min-height: 80px;
}

/* ========== prod_strategies.html ========== */

.prod-form-label {
font-size: 0.875rem;
color: var(--text-secondary);
}

.prod-muted {
color: var(--prod-muted);
}

/* ========== recent_news.html ========== */

.news-toggle-more {
color: blue;
cursor: pointer;
}

/* ========== screener.html ========== */

.screener-saved-heading {
color: var(--primary-blue);
}

.screener-saved-wrap {
margin-top: 1em;
}

.screener-desc-sm {
color: var(--text-muted);
margin-left: 8px;
}

.screener-stock-link {
color: var(--primary-blue);
text-decoration: none;
font-weight: 500;
}

.screener-card-actions {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1em;
}

.screener-card-btn-row {
display: flex;
gap: 0.5em;
}

.screener-muted-sm {
color: var(--text-muted);
}

.screener-metric-pos {
color: var(--success-green);
}

.screener-metric-neg {
color: var(--danger-red);
}

/* ========== economic_regime_dashboard.html ========== */

.er-subtitle-075 {
font-size: 0.75rem;
}

.er-regime-viz-host {
  max-width: 100%;
}
.er-regime-viz-host .er-regime-svg-main {
  max-height: 200px;
  width: auto;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* economic_regime_dashboard — toolbar footer (last updated) */
.er-dashboard-toolbar-meta {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

/* economic_regime_dashboard — gauge + VLS triangle in one row */
.er-vls-row-title {
  letter-spacing: 0.02em;
}
.er-regime-top-row {
  margin-left: 0;
  margin-right: 0;
}
.er-gauge-wrap-compact {
  max-width: 200px;
  height: 155px;
  margin-left: auto;
  margin-right: auto;
}
.er-gauge-value-compact {
  font-size: 1.55rem;
}
.er-gauge-scale-compact {
  max-width: 200px;
  font-size: 0.58rem;
}
.er-vls-col {
  min-height: 240px;
}
.er-regime-viz-inline {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.er-regime-viz-inline .er-regime-svg-main {
  max-height: 240px;
  width: min(100%, 280px);
  max-width: 280px;
  height: auto;
}
@media (min-width: 576px) {
  .er-regime-viz-inline .er-regime-svg-main {
    max-height: 260px;
    max-width: 300px;
    width: min(100%, 300px);
  }
}
@media (min-width: 992px) {
  .er-vls-col {
    min-height: 280px;
  }
  .er-regime-viz-inline .er-regime-svg-main {
    max-height: 300px;
    max-width: 340px;
    width: min(100%, 340px);
  }
}

.er-phase-badge {
font-size: 0.95rem;
}

.er-chart-row-tight {
margin-bottom: -0.5rem;
}

.er-regime-svg-main {
max-width: 100%;
height: 320px;
}

.er-regime-svg-gauge {
transform: rotate(-90deg);
overflow: visible;
}

.er-badge-07 {
font-size: 0.7rem;
}

.er-def-075 {
font-size: 0.75rem;
line-height: 1.3;
}

.er-card-h6 {
font-size: 0.9rem;
}

/* ========== passkey (setup / manage) ========== */

.passkey-setup-hint {
color: var(--text-muted);
display: block;
margin-top: 6px;
}

.passkey-manage-mt {
margin-top: 20px;
}

a.btn-passkey.btn-passkey-block {
display: block;
text-align: center;
text-decoration: none;
}

.list-group.wp-search-suggestions,
ul.stockSuggestions.wp-search-suggestions {
max-height: 200px;
overflow-y: auto;
position: absolute;
background-color: var(--bg-white);
z-index: 999;
}

.wp-factor-chart-card-body {
height: 300px;
position: relative;
}

canvas.wp-factor-symbol-canvas {
width: 100% !important;
height: 250px !important;
}

a.wp-inherit-link {
color: inherit;
text-decoration: none;
}

#allocations-table.wp-table-full-width {
width: 100%;
}

/* ========== rebalancer.html ========== */

#rebalancer-api-loading {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 9999;
align-items: center;
justify-content: center;
flex-direction: column;
}

.rebalancer-spinner-lg {
width: 3rem;
height: 3rem;
}

.wp-font-08 {
font-size: 0.8rem;
}

.rebalancer-table-scroll {
overflow-x: auto;
font-size: 0.85rem;
}

.rebalancer-table-min {
min-width: 1400px;
}

.wp-cursor-pointer {
cursor: pointer;
}

.rebalancer-warning-modal-title {
font-size: 16px;
}

.rebalancer-warning-modal-li {
font-size: 12px;
}

/* ========== base.html (sidebar) ========== */

/* Match body#page-top light sidebar (wright-theme.css) */
.sidebar-form-btn {
background: transparent;
color: var(--text-secondary);
cursor: pointer;
font-family: inherit;
}

#sidebarToggle {
background-color: var(--border-subtle);
color: var(--text-secondary);
}

/* ========== create_strategy.html — task tables (mobile horizontal scroll + sticky actions) ========== */
.wp-strategy-tasks-card {
min-width: 0;
}
.wp-strategy-tasks-card .card-body {
min-width: 0;
}
.wp-strategy-tasks-card .wp-task-tables-scroll,
.wp-strategy-tasks-card .wp-task-tables-scroll .dataTables_wrapper {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
max-width: 100%;
}
.wp-strategy-tasks-card table.dataTable {
width: max-content !important;
min-width: 100% !important;
table-layout: auto !important;
}
.wp-strategy-tasks-card table.dataTable thead th:last-child,
.wp-strategy-tasks-card table.dataTable tbody td:last-child {
position: sticky;
right: 0;
min-width: 168px;
white-space: nowrap;
background: var(--bg-white);
box-shadow: -6px 0 10px -6px rgba(30, 12, 28, 0.12);
z-index: 2;
}
.wp-strategy-tasks-card table.dataTable thead th:last-child {
z-index: 3;
background: var(--bg-subtle);
}
.wp-strategy-tasks-card table.table-hover tbody tr:hover td:last-child {
background-color: rgba(30, 12, 28, 0.06);
}
.wp-strategy-tasks-card table.table-hover tbody tr.table-success td:last-child {
background-color: rgba(87, 152, 136, 0.2);
}
.wp-strategy-tasks-card table.table-hover tbody tr.table-success:hover td:last-child {
background-color: rgba(87, 152, 136, 0.32);
}

/* ========== stock_detail.html ========== */

.stock-detail-chart-area-sm {
height: 10rem;
}

.stock-table-full {
width: 100%;
}

.stock-details-summary {
font-size: 0.8rem;
}

.stock-factor-suggest-dropdown {
top: 100%;
left: 0;
z-index: 1000;
max-height: 200px;
overflow-y: auto;
}

.stock-actions-right {
text-align: right;
}

#aiAnalysisFloating {
display: none;
position: fixed;
bottom: 80px;
right: 20px;
width: 450px;
max-height: 80vh;
background-color: var(--bg-white);
border: 1px solid var(--border-strong);
box-shadow: 0 2px 8px rgba(30, 12, 28, 0.12);
padding: 15px;
overflow-y: auto;
z-index: 1000;
}

.ai-analysis-floating-header {
display: flex;
justify-content: space-between;
align-items: center;
}

#closeAiAnalysis {
border: none;
background: none;
font-size: 0.8rem;
}

#aiAnalysisContent {
font-size: 0.8rem;
margin-left: 5px;
}

#showAiAnalysis {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1001;
width: 60px;
height: 60px;
border-radius: 50%;
border: none;
background: linear-gradient(45deg, var(--brand-teal), var(--primary-blue));
color: var(--on-primary);
font-size: 24px;
box-shadow: 0 4px 8px rgba(30, 12, 28, 0.12);
cursor: pointer;
}

.stock-warning-alert {
font-size: 0.95em;
}

/* ========== indicator_details.html ========== */

.wp-indicator-desc {
font-size: 0.8rem;
margin: 0;
padding: 0;
}

/* ========== eco_data.html ========== */

.eco-source-caption {
font-size: 0.8rem;
color: var(--brand-teal);
}

/* ========== home.html (fund cards) ========== */

.home-fund-pnl {
font-size: 13px;
font-weight: 300;
color: var(--info-cyan-dark);
}

.home-fund-cash {
font-size: 12px;
font-weight: 300;
color: var(--text-muted);
}

/* ========== create_strategy.html (extras) ========== */

.wp-spinner-25 {
width: 2.5rem;
height: 2.5rem;
}

.wp-regime-ts-chart {
height: 280px;
}

.wp-minw-140 {
min-width: 140px;
}

.wp-progress-fixed-h {
width: 100%;
height: 18px;
}

.wp-table-cell-wide {
max-width: 400px;
word-wrap: break-word;
}

/* ========== passkey/base.html ========== */
/* Auth shell: hide sidebar only when body has .wp-auth-shell (set in passkey/base.html, two_factor/_base.html) */
body.wp-auth-shell #accordionSidebar,
body.wp-auth-shell .sidebar,
body.wp-auth-shell #sidebarToggle,
body.wp-auth-shell #sidebarToggleMobile,
body.wp-auth-shell .mobile-nav,
body.wp-auth-shell #wrightDrawerBackdrop,
body.wp-auth-shell .wright-drawer-backdrop,
body.wp-auth-shell .topbar-toggle {
display: none !important;
}

body.wp-auth-shell #content-wrapper {
width: 100% !important;
}

.passkey-container {
max-width: 500px;
margin: 60px auto;
padding: 40px;
background: white;
border-radius: 16px;
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.passkey-header {
text-align: center;
margin-bottom: 30px;
}

.passkey-header h2 {
color: var(--primary-blue);
font-weight: 700;
margin-bottom: 10px;
}

.passkey-header p {
color: var(--text-muted);
font-size: 0.95rem;
}

.passkey-icon {
width: 80px;
height: 80px;
background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 20px;
}

.passkey-icon i {
font-size: 32px;
color: white;
}

.btn-passkey {
width: 100%;
padding: 14px 24px;
font-size: 1.1rem;
font-weight: 600;
border-radius: 10px;
background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
border: none;
color: white;
cursor: pointer;
transition: all 0.3s ease;
}

.btn-passkey:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(213, 123, 200, 0.4);
}

.btn-passkey:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}

.btn-secondary-passkey {
background: var(--bg-page);
color: var(--primary-blue);
border: 2px solid var(--primary-blue);
}

.btn-secondary-passkey:hover {
background: var(--primary-blue);
color: white;
}

.alert-passkey {
padding: 15px 20px;
border-radius: 10px;
margin-bottom: 20px;
font-size: 0.9rem;
}

.alert-passkey.alert-success {
background: rgba(87, 152, 136, 0.2);
color: var(--success-green-dark);
border: 1px solid rgba(87, 152, 136, 0.32);
}

.alert-passkey.alert-danger {
background: rgba(201, 75, 104, 0.15);
color: var(--danger-red-dark);
border: 1px solid rgba(201, 75, 104, 0.22);
}

.alert-passkey.alert-info {
background: rgba(150, 221, 204, 0.18);
color: var(--info-cyan-dark);
border: 1px solid rgba(150, 221, 204, 0.45);
}

.passkey-list {
list-style: none;
padding: 0;
margin: 0;
}

.passkey-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px 20px;
background: var(--bg-page);
border-radius: 10px;
margin-bottom: 10px;
}

.passkey-item-info {
display: flex;
align-items: center;
gap: 15px;
}

.passkey-item-icon {
width: 40px;
height: 40px;
background: var(--primary-blue);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
}

.passkey-item-icon i {
color: white;
font-size: 18px;
}

.passkey-item-details h4 {
margin: 0 0 4px 0;
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
}

.passkey-item-details span {
font-size: 0.85rem;
color: var(--text-muted);
}

.btn-delete-passkey {
background: var(--danger-red);
border: none;
color: white;
padding: 8px 16px;
border-radius: 6px;
cursor: pointer;
font-size: 0.85rem;
transition: all 0.2s ease;
}

.btn-delete-passkey:hover {
background: var(--danger-red-dark);
}

.form-group {
margin-bottom: 20px;
}

.form-label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: var(--text-primary);
}

.form-input {
width: 100%;
padding: 12px 16px;
border: 2px solid var(--border-default);
border-radius: 8px;
font-size: 1rem;
transition: all 0.2s ease;
}

.form-input:focus {
outline: none;
border-color: var(--primary-blue);
box-shadow: 0 0 0 3px rgba(213, 123, 200, 0.1);
}

.loading-spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255,255,255,0.3);
border-radius: 50%;
border-top-color: white;
animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
to { transform: rotate(360deg); }
}

.divider {
display: flex;
align-items: center;
margin: 25px 0;
color: var(--text-muted);
font-size: 0.9rem;
}

.divider::before,
.divider::after {
content: '';
flex: 1;
border-bottom: 1px solid var(--border-default);
}

.divider span {
padding: 0 15px;
}

/* ========== marketcap_details.html ========== */

/* Time period selector styling */
#marketcapTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#marketcapTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== indicator_metrics.html (scoped — #sectorTable is reused on other pages) ========== */

.indicator-metrics-page .im-table-wrap {
width: 100%;
min-width: 0;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

.indicator-metrics-page .dataTables_wrapper {
width: 100%;
min-width: 0;
overflow-x: auto;
}

.indicator-metrics-page #sectorTable th,
.indicator-metrics-page #sectorTable td {
vertical-align: top;
}

.indicator-metrics-page #sectorTable .im-col-text {
white-space: normal;
word-break: break-word;
overflow-wrap: anywhere;
max-width: 22rem;
}

.indicator-metrics-page #sectorTable th:nth-child(1),
.indicator-metrics-page #sectorTable td:nth-child(1) {
text-align: center;
width: 4.5rem;
}

/* ========== portfolio_metrics.html — wide dynamic factor columns + DT scroll ========== */

.portfolio-metrics-page .pm-table-wrap {
width: 100%;
min-width: 0;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

.portfolio-metrics-page .dataTables_wrapper {
width: 100%;
min-width: 0;
overflow-x: auto;
}

.portfolio-metrics-page table.dataTable thead th {
white-space: normal;
word-break: break-word;
overflow-wrap: break-word;
vertical-align: bottom;
line-height: 1.25;
min-width: 4.25rem;
padding: 0.5rem 0.35rem;
}

.portfolio-metrics-page table.dataTable thead th:first-child {
min-width: 8rem;
max-width: 14rem;
}

.portfolio-metrics-page table.dataTable tbody td {
vertical-align: middle;
}

.portfolio-metrics-page table.dataTable tbody td:not(:first-child) {
white-space: nowrap;
}

/* ========== indicator_rag.html ========== */

.answer-content p:first-child { margin-top: 0; }
.answer-content h6 { color: var(--primary-blue); }

/* ========== industry_details.html ========== */

/* Time period selector styling */
#industryTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#industryTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== indicator_details.html ========== */

/* Time period selector styling */
#indicatorTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#indicatorTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== home.html ========== */

.ticker-wrap {                        
height: 2.5rem;               
box-sizing: content-box;
z-index: 1000;
overflow: hidden;
width: 100%;
}

.ticker {
display: inline-block;
height: 2.5rem;
line-height: 2.5rem;
white-space: nowrap;
animation: ticker 30s linear infinite;
padding-left: 100%;
}

.ticker-item {
display: inline-block;
padding: 0 1rem;
font-size: 0.875rem;
color: var(--text-secondary);
}

.ticker-item a {
text-decoration: none;
color: inherit;
}

.ticker-item a:hover {
text-decoration: underline;
}

.ticker-item.positive {
color: var(--brand-teal);
}

.ticker-item.negative {
color: var(--danger-red);
}

@keyframes ticker {
0% { transform: translate3d(0, 0, 0); }
100% { transform: translate3d(-100%, 0, 0); }
}

/* ========== fear_and_greed.html ========== */

/* Time period selector styling */
#fearGreedTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#fearGreedTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== index_details.html ========== */

/* Responsive table styles */
.table-responsive {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

/* Ensure table cells don't wrap unnecessarily */
#companyTable th,
#companyTable td {
white-space: nowrap;
min-width: 80px;
}

/* Make ticker column slightly wider */
#companyTable th:first-child,
#companyTable td:first-child {
min-width: 100px;
}

/* Make sector column wider */
#companyTable th:nth-child(2),
#companyTable td:nth-child(2) {
min-width: 120px;
white-space: normal;
}

/* Factor columns styling */
#companyTable th:nth-child(8),
#companyTable td:nth-child(8),
#companyTable th:nth-child(9),
#companyTable td:nth-child(9),
#companyTable th:nth-child(10),
#companyTable td:nth-child(10),
#companyTable th:nth-child(11),
#companyTable td:nth-child(11) {
min-width: 90px;
text-align: center;
font-weight: 500;
}

/* Earnings column styling */
#companyTable th:nth-child(12),
#companyTable td:nth-child(12) {
min-width: 80px;
text-align: center;
}

/* Table header styling */
#companyTable thead th {
background-color: var(--bg-page);
border-bottom: 2px solid var(--border-default);
font-weight: 600;
color: var(--text-secondary);
text-align: center;
}

#companyTable thead th:first-child,
#companyTable thead th:nth-child(2),
#companyTable thead th:nth-child(3) {
text-align: left;
}

/* Responsive modal for details */
.dtr-modal {
max-width: 90vw;
max-height: 90vh;
overflow: auto;
}

/* Improve mobile experience */
@media (max-width: 768px) {
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
text-align: left;
margin-bottom: 10px;
}
  
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
text-align: center;
margin-top: 10px;
}
  
.dataTables_wrapper .dataTables_paginate .paginate_button {
padding: 5px 8px;
margin: 0 2px;
}
}

/* Hover effects for better UX */
#companyTable tbody tr:hover {
background-color: rgba(0,0,0,.075);
}

/* Gradient background for day return cells */
#companyTable td:nth-child(5) {
transition: background-color 0.3s ease;
}

/* Time period selector styling */
#timePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#timePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* Current period display styling */
#currentPeriodDisplay {
background-color: var(--pastel-icy-blue);
border: 1px solid var(--primary-blue-light);
border-radius: 0.35rem;
padding: 0.375rem 0.75rem;
font-weight: 500;
color: var(--primary-blue-dark);
}

/* ========== factors.html ========== */

.custom-control-input:checked ~ .custom-control-label::before {
background-color: var(--primary-blue);
border-color: var(--primary-blue);
}

.custom-control-input:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}

.custom-switch .custom-control-label::before {
height: 1.5rem;
width: 2.75rem;
border-radius: 1rem;
}

.custom-switch .custom-control-label::after {
height: calc(1.5rem - 4px);
width: calc(1.5rem - 4px);
border-radius: calc(1.5rem - 4px);
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
transform: translateX(1.25rem);
}

/* Factors dashboard: reference-style hero (flat card, no heavy shadow) */
.factors-dashboard .factor-strategy-hero-card {
  box-shadow: none !important;
  border: 1px solid rgba(30, 12, 28, 0.08);
}

/* Factors dashboard: hero line chart (no .chart-area — sb-admin caps .chart-area canvas at 300px) */
.factors-dashboard .factor-strategy-exposures-hero-area {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 30rem;
  min-height: 460px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
@media (min-width: 768px) {
  .factors-dashboard .factor-strategy-exposures-hero-area {
    height: 34rem;
    min-height: 520px;
  }
}
.factors-dashboard .factor-strategy-exposures-hero-area canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
}

/* Factors line charts: soft plot background (reference-style) */
.factors-dashboard .chart-area {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* ========== economic_regime_forecast_dashboard.html ========== */

.chart-container {
position: relative;
height: 400px;
margin-bottom: 1rem;
}
.forecast-card {
margin-bottom: 2rem;
}
.signal-indicator {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 5px;
}
.signal-long {
background-color: var(--success-green);
}
.signal-short {
background-color: var(--danger-red);
}
.signal-neutral {
background-color: var(--text-muted);
}

/* ========== economic_regime_dashboard.html ========== */

.chart-container {
position: relative;
height: 300px;
margin-bottom: 1rem;
}
.chart-loading {
opacity: 0.6;
pointer-events: none;
}
.indicator-card {
margin-bottom: 1.5rem;
}
#regime3dChart {
min-height: 400px;
overflow: visible;
}
#regime3dChart .dial-gauge-wrap {
min-height: 180px;
overflow: visible;
display: flex;
align-items: center;
justify-content: center;
}
#regime3dChart .regime-radar-row { margin-bottom: 0.25rem; }
#regime3dChart .regime-dial-row { margin-top: 0.25rem; }
#regime3dChart .regime-dial-row .col-md-4 { padding-left: 0.5rem; padding-right: 0.5rem; }

/* ========== eco_data.html ========== */

/* Time period selector styling */
#ecoTimePeriodSelect {
border: 2px solid var(--border-default);
border-radius: 0.35rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
font-size: 0.875rem;
}

#ecoTimePeriodSelect:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 0.2rem rgba(213, 123, 200, 0.25);
}


/* ========== admin/main/profilingstats/change_list.html ========== */

.object-tools-items {
    margin-bottom: 20px;
}
      
.object-tools-items .btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    background: var(--primary-blue-light);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}
      
.object-tools-items .btn:hover {
    background: var(--primary-blue-dark);
}
      
.status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}
      
.status-success {
    background-color: var(--success-green);
}
      
.status-warning {
    background-color: var(--warning-orange);
    color: var(--text-primary);
}
      
.status-danger {
    background-color: var(--danger-red);
}
      
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
      
.empty-state code {
    background: var(--bg-page);
    padding: 2px 6px;
    border-radius: 3px;
}
      
.summary {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-page);
    border-radius: 4px;
}

/* ========== docs_link.html (admin content) ========== */

.docs-link-page {
max-width: 800px;
margin: 40px auto;
padding: 20px;
}

.docs-link-page-title {
margin-bottom: 20px;
}

.docs-link-callout {
padding: 20px;
margin: 20px 0;
}

.docs-link-callout-info {
background: var(--bg-page);
border-left: 4px solid var(--primary-blue);
}

.docs-link-h2-flush {
margin-top: 0;
}

.docs-link-list-plain {
list-style: none;
padding: 0;
}

.docs-link-li-spaced {
margin: 10px 0;
}

.docs-link-anchor {
font-size: 16px;
color: var(--primary-blue);
text-decoration: none;
}

.docs-link-panel {
background: var(--bg-white);
border: 1px solid var(--border-default);
border-radius: 4px;
padding: 20px;
margin: 20px 0;
}

.docs-link-alert {
border-radius: 4px;
padding: 15px;
margin: 20px 0;
}

.docs-link-alert-warning {
background: rgba(184, 131, 42, 0.12);
border: 1px solid var(--warning-orange);
}

.docs-link-alert-success {
background: rgba(87, 152, 136, 0.2);
border: 1px solid var(--success-green);
}

.docs-link-alert-danger {
background: rgba(201, 75, 104, 0.15);
border: 1px solid var(--danger-red);
}

.docs-link-actions {
margin-top: 30px;
text-align: center;
}

.docs-link-btn-primary {
display: inline-block;
background: var(--primary-blue);
color: var(--on-primary);
padding: 12px 30px;
text-decoration: none;
border-radius: 4px;
font-weight: bold;
}

.docs-link-form-inline {
display: inline-block;
margin-left: 15px;
}

.docs-link-btn-deploy {
background: var(--success-green);
color: var(--on-primary);
padding: 12px 30px;
border: none;
border-radius: 4px;
font-weight: bold;
cursor: pointer;
}

.docs-link-footer {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid var(--border-default);
color: var(--text-muted);
font-size: 14px;
}

.docs-link-pre {
background: var(--bg-page);
padding: 10px;
border-radius: 4px;
overflow-x: auto;
}

.docs-link-p-mt {
margin-top: 15px;
}

/* ========== admin/base_site.html ========== */

.docs-link {
display: inline-block;
padding: 8px 15px;
margin-right: 15px;
background: var(--primary-blue-dark);
color: var(--on-primary) !important;
text-decoration: none;
border-radius: 4px;
font-weight: 500;
transition: background 0.2s;
}
.docs-link:hover {
background: var(--brand-deep);
text-decoration: none;
}
.docs-link::before {
content: "📚 ";
}

/* ========== factors.html — full-width strategy exposures hero ========== */
.factors-dashboard .factor-strategy-hero-card {
  box-shadow: none !important;
  border: 1px solid rgba(30, 12, 28, 0.08);
}

.factors-dashboard .factor-strategy-exposures-hero-area {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 30rem;
  min-height: 460px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
@media (min-width: 768px) {
  .factors-dashboard .factor-strategy-exposures-hero-area {
    height: 34rem;
    min-height: 520px;
  }
}
.factors-dashboard .factor-strategy-exposures-hero-area canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
}

/* ========== fear_and_greed.html — dashboard ========== */
.fg-page .fg-dashboard {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.fg-page .fg-dashboard-toolbar {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}
.fg-page .fg-dashboard-body {
  padding: var(--spacing-xl);
  background: var(--bg-page);
}
.fg-gauge-box {
  text-align: center;
  padding: var(--spacing-md);
}
.fg-gauge-wrap {
  position: relative;
  height: 160px;
  max-width: 220px;
  margin: 0 auto;
}
.fg-gauge-wrap canvas {
  display: block;
  margin: 0 auto;
}
.fg-gauge-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  pointer-events: none;
}
.fg-gauge-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}
.fg-pill {
  display: inline-block;
  margin-top: var(--spacing-sm);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.fg-pill-ef { background: rgba(201, 75, 104, 0.22); color: var(--danger-red); }
.fg-pill-f { background: rgba(250, 168, 241, 0.28); color: var(--primary-blue-dark); }
.fg-pill-n { background: rgba(184, 131, 42, 0.18); color: var(--warning-orange-dark); }
.fg-pill-g { background: rgba(87, 152, 136, 0.2); color: var(--success-green-dark); }
.fg-pill-eg { background: rgba(150, 221, 204, 0.45); color: var(--brand-teal-deep); }
.fg-gauge-scale {
  margin-top: var(--spacing-md);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}
.fg-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}
@media (max-width: 576px) {
  .fg-metric-grid { grid-template-columns: repeat(2, 1fr); }
}
.fg-metric-cell {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-sm);
  min-height: 88px;
  box-shadow: var(--shadow-sm);
}
.fg-metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.fg-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.fg-metric-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.fg-chart-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}
.fg-category-scores {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
  box-shadow: var(--shadow-sm);
}
.fg-category-scores .fg-chart-title {
  margin-bottom: var(--spacing-md);
  padding-left: 2px;
}
.fg-category-scores .fg-bar-h {
  height: 220px;
  position: relative;
}
.fg-radar-h {
  height: 280px;
}
.fg-bar-h {
  height: 260px;
}

/* Fear & Greed — quant block: horizontal bar + card grid */
.fg-page .fg-quant-section .fg-quant-bar-h {
  height: 280px;
  position: relative;
}
.fg-page .fg-quant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 0.65rem;
}
.fg-page .fg-quant-card {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem 0.7rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.fg-page .fg-quant-card:hover {
  box-shadow: var(--shadow-md);
}
.fg-page .fg-quant-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.fg-page .fg-quant-card-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  flex: 1;
  min-width: 0;
}
.fg-page .fg-quant-card-title-wrap .fg-quant-card-title {
  flex: 0 1 auto;
}
.fg-page .fg-quant-card-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.fg-page .fg-quant-card-z {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.fg-page .fg-quant-mini-meter {
  position: relative;
  height: 9px;
  margin-bottom: 0.35rem;
}
.fg-page .fg-quant-mini-meter-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: rgba(30, 12, 28, 0.06);
}
.fg-page .fg-quant-mini-meter-zero {
  position: absolute;
  left: 50%;
  top: -1px;
  bottom: -1px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: rgba(74, 62, 72, 0.35);
  z-index: 1;
}
.fg-page .fg-quant-mini-fill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 4px;
  opacity: 0.88;
  z-index: 0;
}
.fg-page .fg-quant-card-deltas {
  font-size: 0.72rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.fg-breakdown-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.fg-breakdown-score {
  flex: 0 0 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-deep);
}
.fg-breakdown-meta { flex: 1; min-width: 0; }
.fg-breakdown-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}
.fg-breakdown-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.fg-breakdown-bar-wrap {
  flex: 0 0 28%;
  max-width: 140px;
  height: 6px;
  background: var(--pastel-icy-blue);
  border-radius: 999px;
  overflow: hidden;
}
.fg-breakdown-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}
.fg-chevron {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.5;
}
.fg-history-card .card-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

/* Economic regime — AI commentary (Claude) */
.fg-page .er-ai-commentary-box {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}
.fg-page .er-ai-commentary-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
}
.fg-page .er-ai-commentary-disclaimer {
  font-size: 0.65rem;
  opacity: 0.85;
}

/* ========== home.html — rich dashboard ========== */
body#page-top.home-dashboard-page .home-dashboard-wrap {
  background: #ffffff;
}
body#page-top.home-dashboard-page .home-dash-container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
body#page-top.home-dashboard-page .home-kpi-row {
  margin-bottom: 0.25rem;
}
body#page-top.home-dashboard-page .home-kpi-card {
  border-radius: var(--radius-lg, 0.75rem) !important;
  border: 1px solid rgba(30, 12, 28, 0.06) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
body#page-top.home-dashboard-page .home-kpi-card .card-body {
  padding: 1.2rem 1.35rem;
}
body#page-top.home-dashboard-page .home-kpi-card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1.5rem rgba(30, 12, 28, 0.1) !important;
  text-decoration: none;
}
body#page-top.home-dashboard-page .home-kpi-card .text-gray-300 {
  opacity: 0.45;
}
body#page-top.home-dashboard-page .home-kpi-card-icon {
  opacity: 0.5;
  display: block;
  line-height: 1;
}
body#page-top.home-dashboard-page .home-dash-main-row {
  margin-bottom: 0.5rem;
}
body#page-top.home-dashboard-page .home-dash-main-col {
  display: flex;
  flex-direction: column;
}
body#page-top.home-dashboard-page .home-dash-card {
  border-radius: 1rem;
  border: 1px solid rgba(30, 12, 28, 0.07) !important;
  box-shadow:
    0 1px 2px rgba(30, 12, 28, 0.04),
    0 0.75rem 2rem rgba(30, 12, 28, 0.06) !important;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.25s ease;
}
body#page-top.home-dashboard-page .home-dash-card:hover {
  box-shadow:
    0 1px 3px rgba(30, 12, 28, 0.05),
    0 1rem 2.25rem rgba(30, 12, 28, 0.08) !important;
}
body#page-top.home-dashboard-page .home-fg-panel {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 248, 253, 0.95) 100%);
}
body#page-top.home-dashboard-page .home-vls-panel {
  background: linear-gradient(195deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 250, 0.96) 100%);
}
body#page-top.home-dashboard-page .home-dash-card-header {
  padding: 0.75rem 1.5rem;
  min-height: 4.25rem;
  box-sizing: border-box;
}
body#page-top.home-dashboard-page .home-dash-card-header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
}
body#page-top.home-dashboard-page .home-dash-card-header .home-dash-eyebrow {
  margin-bottom: 0;
}
body#page-top.home-dashboard-page .home-dash-secondary-title {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
body#page-top.home-dashboard-page .home-dash-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-muted, #8a7d88);
  margin-bottom: 0.35rem;
}
body#page-top.home-dashboard-page .home-dash-title {
  color: var(--text-primary, #2d2430);
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  line-height: 1.25;
}
body#page-top.home-dashboard-page .home-fg-card-header {
  gap: 0.75rem 1rem;
}
body#page-top.home-dashboard-page .home-dash-main-row .home-dash-card-header {
  align-items: center;
}
body#page-top.home-dashboard-page .home-fg-hero-bar {
  width: 100%;
}
body#page-top.home-dashboard-page .home-fg-hero-block {
  flex: 0 0 auto;
  min-width: 5.5rem;
}
body#page-top.home-dashboard-page .home-fg-hero-value {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #2d2430);
}
body#page-top.home-dashboard-page .home-fg-hero-pill {
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
body#page-top.home-dashboard-page .home-dash-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
body#page-top.home-dashboard-page .home-dash-icon-btn:hover {
  background: rgba(213, 123, 200, 0.12);
  color: var(--primary-blue-dark, #4a3e48) !important;
}
body#page-top.home-dashboard-page .home-fg-chart-link {
  min-height: 0;
  color: inherit;
  cursor: pointer;
  outline: none;
}
body#page-top.home-dashboard-page .home-fg-chart-link:hover .home-fg-chart-wrap,
body#page-top.home-dashboard-page .home-fg-chart-link:focus .home-fg-chart-wrap {
  border-color: rgba(213, 123, 200, 0.4);
  box-shadow: 0 0 0 2px rgba(213, 123, 200, 0.12);
}
body#page-top.home-dashboard-page .home-fg-chart-link:focus {
  outline: none;
}
body#page-top.home-dashboard-page .home-fg-chart-wrap {
  min-height: 280px;
  height: 100%;
  max-height: 360px;
  position: relative;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(253, 250, 252, 0.9) 100%);
  border: 1px solid rgba(30, 12, 28, 0.05);
  padding: 0.5rem 0.35rem 0.5rem;
}
@media (min-width: 1200px) {
  body#page-top.home-dashboard-page .home-fg-chart-wrap {
    min-height: 300px;
  }
}
body#page-top.home-dashboard-page .home-vls-summary {
  font-size: 0.88rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary, #4a3e48);
  letter-spacing: 0.01em;
  word-break: break-word;
}
body#page-top.home-dashboard-page .home-vls-footer {
  border-color: rgba(30, 12, 28, 0.08) !important;
}
body#page-top.home-dashboard-page .home-vls-ai {
  border-color: rgba(30, 12, 28, 0.08);
}
body#page-top.home-dashboard-page .home-ai-overview-row {
  margin-top: 0.15rem;
}
body#page-top.home-dashboard-page .home-ai-overview-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 252, 255, 0.96) 100%);
}
body#page-top.home-dashboard-page .home-vls-ai-body {
  line-height: 1.65;
  font-size: 0.9rem;
  color: var(--text-secondary, #4a3e48);
  word-break: break-word;
}
body#page-top.home-dashboard-page .home-vls-ai-body .home-vls-ai-para {
  margin-bottom: 0.85rem;
  line-height: inherit;
}
body#page-top.home-dashboard-page .home-vls-ai-body .home-vls-ai-para:last-child {
  margin-bottom: 0;
}
body#page-top.home-dashboard-page .home-vls-ai-body strong {
  font-weight: 700;
  color: var(--text-primary, #2d2430);
}
body#page-top.home-dashboard-page .home-vls-ai-meta .home-vls-ai-refresh {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  line-height: 1.3;
  border-color: rgba(30, 12, 28, 0.18);
  color: var(--text-secondary, #4a3e48);
}
body#page-top.home-dashboard-page .home-vls-ai-meta .home-vls-ai-refresh:hover {
  color: var(--text-primary, #2d2430);
  background: rgba(30, 12, 28, 0.04);
  border-color: rgba(30, 12, 28, 0.28);
}
body#page-top.home-dashboard-page .home-vls-radar-wrap {
  height: min(280px, 42vw);
  min-height: 220px;
  position: relative;
  max-width: 300px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.5rem;
  border-radius: 1rem;
  background: radial-gradient(ellipse 85% 75% at 50% 42%, rgba(87, 152, 136, 0.08), transparent 70%);
}
@media (min-width: 1200px) {
  body#page-top.home-dashboard-page .home-vls-radar-wrap {
    min-height: 260px;
    height: 280px;
  }
}
body#page-top.home-dashboard-page .home-vls-phase-pill {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(30, 12, 28, 0.08);
}
body#page-top.home-dashboard-page .home-vls-asof {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
body#page-top.home-dashboard-page .home-vls-cta {
  border-radius: 2rem;
  padding: 0.45rem 1.25rem;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  border: 1px solid rgba(213, 123, 200, 0.45);
  color: var(--primary-blue-dark, #5c4a62);
  background: rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
body#page-top.home-dashboard-page .home-vls-cta:hover {
  background: rgba(213, 123, 200, 0.12);
  border-color: rgba(213, 123, 200, 0.65);
  color: var(--text-primary, #2d2430);
  text-decoration: none;
  transform: translateY(-1px);
}
body#page-top.home-dashboard-page .home-dash-secondary .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(30, 12, 28, 0.06);
}
body#page-top.home-dashboard-page .home-dash-secondary .card-body {
  padding-top: 1rem;
}
body#page-top.home-dashboard-page .home-dash-secondary-row {
  margin-top: 0.25rem;
}

/* Index breadth heatmap — full-width card per category + compact tile grid */
body#page-top.home-dashboard-page .home-sector-heatmap-toolbar,
body#page-top.home-dashboard-page .home-sector-heatmap-category {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 249, 251, 0.98) 100%);
}
body#page-top.home-dashboard-page .home-sector-heatmap-toolbar .home-dash-eyebrow,
body#page-top.home-dashboard-page .home-sector-heatmap-category .home-dash-eyebrow {
  color: #4f4350;
}
body#page-top.home-dashboard-page .home-sector-heatmap-toolbar .home-dash-title,
body#page-top.home-dashboard-page .home-sector-heatmap-category .home-dash-title {
  color: #120c14;
  font-weight: 800;
}
body#page-top.home-dashboard-page .home-sector-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 0.4rem;
}
@media (min-width: 768px) {
  body#page-top.home-dashboard-page .home-sector-heatmap-grid {
    grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr));
  }
}
@media (min-width: 1200px) {
  body#page-top.home-dashboard-page .home-sector-heatmap-grid {
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  }
}
body#page-top.home-dashboard-page .home-sector-heat-tile {
  text-decoration: none;
  border-radius: 6px;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  transition: transform 0.12s ease, filter 0.12s ease;
  box-shadow: none;
}
body#page-top.home-dashboard-page .home-sector-heat-tile--compact {
  min-height: 3.35rem;
  padding: 0.32rem 0.4rem 0.28rem;
}
body#page-top.home-dashboard-page .home-sector-heat-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  text-decoration: none;
}
body#page-top.home-dashboard-page .home-sector-heat-tile--live {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45);
}
body#page-top.home-dashboard-page .home-sector-heat-tile--nodata {
  background: #ffffff !important;
  color: #3d3640 !important;
  border: 1px dashed rgba(30, 12, 28, 0.22);
}
body#page-top.home-dashboard-page .home-sector-heat-tile--compact .home-sector-heat-name {
  font-size: 0.58rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  opacity: 0.98;
  flex: 1 1 auto;
  min-height: 0;
}
body#page-top.home-dashboard-page .home-sector-heat-tile--nodata .home-sector-heat-name {
  color: #4a3e48;
  opacity: 1;
}
body#page-top.home-dashboard-page .home-sector-heat-tile--compact .home-sector-heat-pct {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 0.2rem;
  flex-shrink: 0;
}
body#page-top.home-dashboard-page .home-sector-heat-tile--nodata .home-sector-heat-pct {
  color: var(--text-muted, #8a7d88);
  font-weight: 700;
}
body#page-top.home-dashboard-page .home-heatmap-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
body#page-top.home-dashboard-page .home-heatmap-chip {
  border: 1px solid rgba(30, 12, 28, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #4f4350;
  border-radius: 999px !important;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.32rem 0.58rem;
}
body#page-top.home-dashboard-page .home-heatmap-chip:hover {
  color: #120c14;
  background: rgba(255, 255, 255, 1);
  border-color: rgba(30, 12, 28, 0.22);
}
body#page-top.home-dashboard-page .home-heatmap-chip.active {
  background: rgba(168, 72, 152, 0.22);
  border-color: rgba(118, 42, 108, 0.55);
  color: #120c14;
}
