/* ── Forecast Stats Custom (All Periods + 3M) ── */
.fs-container { width:100%; max-width:100%; padding:0 50px; margin:0 auto; font-family:inherit; box-sizing:border-box; }

/* Loading */
.fs-loading { text-align:center; padding:60px 20px; color:inherit; opacity:.5; font-size:15px; }
.fs-spinner { display:inline-block; width:32px; height:32px; border:3px solid #e5e7eb; border-top-color:#2563eb; border-radius:50%; animation:fs-spin .7s linear infinite; margin-bottom:12px; }
@keyframes fs-spin { to { transform:rotate(360deg); } }

/* Filters row */
.fs-filters { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; margin-bottom:20px; padding:16px 20px; background:#f8f8f8; border:1px solid #e0e0e0; border-radius:10px; }
.fs-filter-group { display:flex; flex-direction:column; gap:4px; min-width:140px; flex:1 1 140px; }
.fs-filter-group.fs-range-group { min-width:100px; flex:0 1 110px; margin-left:16px; }
.fs-filter-group.fs-range-group .fs-filter-label { text-align:center; }

/* Period toggle */
.fs-period-toggle { display:flex; gap:0; border:1px solid #d1d5db; border-radius:6px; overflow:hidden; }
.fs-period-toggle-btn { padding:7px 12px; font-size:11px; font-weight:600; cursor:pointer; background:#fff; color:#555; border:none; border-right:1px solid #d1d5db; transition:all .15s; text-transform:uppercase; letter-spacing:.3px; }
.fs-period-toggle-btn:last-child { border-right:none; }
.fs-period-toggle-btn:hover { background:#f1f5f9; }
.fs-period-toggle-btn.active { background:#0083c2; color:#fff; }
.fs-filter-label { font-size:11px; font-weight:700; color:#333; text-transform:uppercase; letter-spacing:.8px; margin-bottom:2px; text-align:center; }

/* Dropdown filter */
.fs-select-wrap { position:relative; }
.fs-select-btn {
    width:100%; padding:8px 30px 8px 10px; border:1px solid #d1d5db; border-radius:6px;
    background:#fff; font-size:13px; color:#333; cursor:pointer; text-align:left;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; box-sizing:border-box;
    appearance:none; outline:none; transition:border-color .2s;
}
.fs-select-btn:focus { border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.fs-select-btn::after { content:"\25BC"; position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:10px; color:inherit; opacity:.5; pointer-events:none; }
.fs-select-wrap .fs-dropdown {
    display:none; position:absolute; top:100%; left:0; right:0; z-index:100;
    background:#fff; border:1px solid #d1d5db; border-radius:6px; margin-top:2px;
    box-shadow:0 4px 16px rgba(0,0,0,.1); max-height:280px; overflow:hidden;
    flex-direction:column;
}
.fs-select-wrap.open .fs-dropdown { display:flex; }
.fs-dropdown-search {
    padding:8px 10px; border:none; border-bottom:1px solid #e5e7eb;
    font-size:13px; outline:none; box-sizing:border-box; width:100%;
}
.fs-dropdown-list { overflow-y:auto; max-height:230px; }
.fs-dropdown-item {
    padding:7px 10px; font-size:13px; color:inherit; cursor:pointer;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.fs-dropdown-item:hover { background:#eff6ff; }
.fs-dropdown-item.selected { background:#2563eb; color:#fff; }

/* Dual range slider */
.fs-slider-wrap { position:relative; width:100%; height:40px; }
.fs-slider-track { position:absolute; top:18px; left:0; right:0; height:4px; background:#d0d0d0; border-radius:2px; }
.fs-slider-range { position:absolute; top:18px; height:4px; background:#0277bd; border-radius:2px; }
.fs-slider-wrap input[type=range] {
    position:absolute; top:9px; width:100%; height:22px; margin:0; padding:0;
    -webkit-appearance:none; appearance:none; background:transparent; pointer-events:none; z-index:3;
    outline:none; border:none; box-shadow:none;
}
.fs-slider-wrap input[type=range]::-webkit-slider-thumb {
    -webkit-appearance:none; width:21px; height:21px; border-radius:50%;
    background:#0083c2; border:none; box-shadow:0 1px 4px rgba(0,0,0,.28);
    cursor:pointer; pointer-events:all;
}
.fs-slider-wrap input[type=range]::-moz-range-thumb {
    width:21px; height:21px; border-radius:50%;
    background:#0083c2; border:none; box-shadow:0 1px 4px rgba(0,0,0,.28);
    cursor:pointer; pointer-events:all;
}
.fs-slider-vals { display:flex; justify-content:space-between; gap:4px; margin-top:4px; }
.fs-slider-vals span { font-size:11px; font-weight:600; color:#333; background:#f0f0f0; border:1px solid #d8d8d8; border-radius:3px; padding:1px 5px; min-width:28px; text-align:center; display:inline-block; }

/* Clear button */
.fs-clear-btn {
    padding:8px 16px; border:1px solid #d1d5db; border-radius:6px;
    background:#fff; color:#333; font-size:13px; font-weight:600;
    cursor:pointer; white-space:nowrap; transition:all .2s; align-self:flex-end;
}
.fs-clear-btn:hover { background:#f3f4f6; border-color:#9ca3af; color:#111; }

/* Info bar */
.fs-info { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; flex-wrap:wrap; gap:8px; }
.fs-info-text { font-size:13px; color:inherit; opacity:.7; }
.fs-per-page { display:flex; align-items:center; gap:6px; font-size:13px; color:inherit; opacity:.7; }
.fs-per-page select { padding:4px 24px 4px 8px; border:1px solid #d1d5db; border-radius:4px; font-size:13px; outline:none; min-width:60px; }

/* Table */
.fs-table-wrap { overflow-x:auto; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }
.fs-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.fs-table thead th {
    background:#f8f8f8; padding:10px 4px; text-align:center;
    font-size:10.5px; font-weight:700; color:#475569; text-transform:uppercase;
    letter-spacing:.2px; border-bottom:2px solid #e5e7eb; cursor:pointer;
    white-space:normal; word-break:normal; overflow-wrap:break-word; line-height:1.3;
    user-select:none; transition:background .15s;
    position:sticky; top:0; z-index:2;
}
.fs-table thead th:hover { background:#efefef; }
.fs-table thead th .fs-sort-icon { font-size:9px; position:absolute; right:3px; top:50%; transform:translateY(-50%); color:inherit; opacity:0; display:block; transition:opacity .15s; }
.fs-table thead th:hover .fs-sort-icon { opacity:.45; }
.fs-table thead th.fs-sorted-asc .fs-sort-icon, .fs-table thead th.fs-sorted-desc .fs-sort-icon { opacity:1; }
.fs-table thead th.fs-sorted-asc, .fs-table thead th.fs-sorted-desc { background:#eef6fb; color:#0083c2; }
.fs-table tbody td.fs-sorted-col { background:#f5f5f5; }
.fs-table tbody tr:nth-child(even) td.fs-sorted-col { background:#f5f5f5; }
.fs-table tbody tr { transition:background .12s; }
.fs-table tbody tr:nth-child(even) { background:#f8f8f8; }
.fs-table tbody tr:hover { background:#f0f0f0; }
.fs-table tbody td { padding:9px 4px; font-size:11px; color:#333; border-bottom:1px solid #e5e7eb; overflow:hidden; font-weight:450; white-space:normal; word-break:break-word; line-height:1.4; vertical-align:middle; }
.fs-table td.fs-num { white-space:nowrap; word-break:normal; }
.fs-table thead th { overflow:visible; }
.fs-table tbody tr:last-child td { border-bottom:none; }

/* Numeric alignment */
.fs-table td.fs-num { text-align:right; font-variant-numeric:tabular-nums; }

/* Positive / Negative value colors */
.fs-val-pos { color:#16a34a !important; }
.fs-val-neg { color:#dc2626 !important; }
/* Forecast cell: pct + price stacked */
.fs-fc-cell { display:flex; flex-direction:column; align-items:flex-end; gap:1px; padding:2px 0; }
.fs-fc-pct { font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.fs-fc-price { font-size:11px; color:#999; font-weight:550; font-variant-numeric:tabular-nums; }
/* Confidence / Accuracy values */
.fs-prob-val { font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.fs-acc-val { font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.fs-table th.fs-num { text-align:center; padding-left:2px; padding-right:12px; }
.fs-table th.fs-num .fs-sort-icon { left:auto; right:1px; top:50%; transform:translateY(-50%); }

/* Period group header — one brand-blue label per group, same background as the column names */
.fs-table thead tr.fs-period-row th {
    background:#f8f8f8; font-size:11px; font-weight:700; letter-spacing:.5px;
    border-bottom:none; cursor:default; padding:10px 4px 2px;
    text-transform:uppercase; color:#475569;
}
.fs-table thead tr.fs-period-row th[colspan]:hover { background:#f8f8f8; }
.fs-period-pill { display:inline-block; padding:3px 12px; border-radius:999px; background:#e6f3fa; color:#0083c2; font-size:10.5px; font-weight:700; letter-spacing:.6px; line-height:1.4; }
/* Sub-header row */
.fs-table thead tr:not(.fs-period-row) th { background:#f8f8f8; color:#475569 !important; }
.fs-table thead tr:not(.fs-period-row) th.fs-sorted-asc, .fs-table thead tr:not(.fs-period-row) th.fs-sorted-desc { background:#eef6fb; color:#0083c2 !important; }
/* Thin dividers between the period groups and before the chart */
.fs-table tr.fs-period-row th[colspan], .fs-table .fs-grp-start, .fs-table .fs-col-chart, .fs-table th.fs-chart-th { border-left:1px solid #e5e7eb; }

/* Chart thumbnail */
.fs-chart-img { display:block !important; width:100% !important; height:auto !important; max-width:100% !important; border-radius:4px; object-fit:contain; }
.fs-col-chart { padding:4px !important; vertical-align:middle; }
.fs-col-symbol { overflow:hidden; word-break:break-word; line-height:1.3; position:relative; padding-left:16px !important; }
.fs-col-symbol::before { content:''; position:absolute; left:4px; top:50%; transform:translateY(-50%); width:9px; height:10px; background:var(--fs-type-color, transparent); clip-path:polygon(0 0, 100% 50%, 0 100%); }
.fs-symtype-crypto    { --fs-type-color:#f7931a; }
.fs-symtype-forex     { --fs-type-color:#2563eb; }
.fs-symtype-stock     { --fs-type-color:#0d9488; }
.fs-symtype-etf       { --fs-type-color:#7530dd; }
.fs-symtype-index     { --fs-type-color:#ec4899; }
.fs-symtype-commodity { --fs-type-color:#dc2626; }
.fs-sym-ticker { font-weight:700; font-size:13px; display:block; }
.fs-sym-company { font-weight:400; font-size:12px; color:#999; display:block; }
.fs-model-badge { display:inline-block; font-size:10px; font-weight:600; color:#fff; background:#6b7280; border-radius:3px; padding:1px 5px; margin-top:2px; }

/* Watchlist star */
.fs-table thead th:last-child { color:#0083c2; }
.fs-table td:last-child { text-align:center; vertical-align:middle; }
.fs-star { cursor:pointer; font-size:1.3em; user-select:none; transition:transform .15s; display:inline-block; }
.fs-star:hover { transform:scale(1.3); }
.fs-star.active { color:#f5a623; }
.fs-star.inactive { color:#ccc; }

/* Pagination */
.fs-pagination { display:flex; justify-content:center; align-items:center; gap:4px; margin-top:16px; flex-wrap:wrap; }
.fs-page-btn {
    min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
    border:1px solid #d1d5db; border-radius:6px; background:#fff; font-size:13px;
    color:inherit; cursor:pointer; transition:all .15s; padding:0 10px;
}
.fs-page-btn:hover:not(.active):not(:disabled) { background:#eff6ff; border-color:#2563eb; color:#2563eb; }
.fs-page-btn.active { background:#2563eb; color:#fff; border-color:#2563eb; }
.fs-page-btn:disabled { opacity:.4; cursor:default; }
.fs-page-dots { padding:0 6px; color:inherit; opacity:.4; font-size:13px; }

/* No results */
.fs-no-results { text-align:center; padding:50px 20px; color:inherit; opacity:.5; font-size:15px; }

/* Accuracy sample count */
.fs-acc-samples { font-size:9px; color:#999; display:block; line-height:1; margin-top:1px; }
.fs-accuracy-note { font-size:11px; color:#777; margin-bottom:12px; padding:6px 12px; background:#f9fafb; border:1px solid #e5e7eb; border-radius:6px; display:inline-block; }

/* Responsive */
@media (max-width:1100px) {
    .fs-container { padding:0 16px; }
    /* table keeps its columns and scrolls sideways inside its frame; symbol column stays visible */
    .fs-table-wrap { -webkit-overflow-scrolling:touch; }
    .fs-table { min-width:1100px; }
    .fs-table thead tr:first-child th:first-child, .fs-table tbody td:first-child { position:sticky; left:0; z-index:3; background:#fff; box-shadow:1px 0 0 #e5e7eb; }
    .fs-table thead tr:first-child th:first-child { background:#f8f8f8; z-index:4; }
}
@media (max-width:768px) {
    .fs-container { padding:0 10px; }
    .fs-filters { padding:12px; gap:10px; }
    .fs-filter-group { min-width:100%; }
    .fs-table thead tr:first-child th:first-child { width:150px !important; }
    .fs-filter-group.fs-range-group { min-width:40%; flex:1 1 40%; margin-left:0; }
    .fs-period-toggle-btn { padding:10px 12px; font-size:12px; flex:1; }
    .fs-table thead th { font-size:10px; }
    .fs-table tbody td { font-size:12px; }
}
/* phones: no text below 11 px (mobile audit 2026-10-30) */
@media (max-width:767px){.fs-acc-samples{font-size:11px}.fs-table th.fs-num,.fs-table td.fs-num{font-size:11px}}
