:root {
    --bg: #0f172a;
    --s1: #1e293b;
    --s2: #334155;
    --tx: #f1f5f9;
    --t2: #94a3b8;
    --ac: #3b82f6;
    --gn: #22c55e;
    --rd: #ef4444;
    --yw: #f59e0b;
    --cy: #06b6d4;
}

/* ===== Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--tx);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 40px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--ac);
    transition: color .2s;
}

a:hover {
    color: #60a5fa;
}

/* ===== Header ===== */
.header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--s2);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--tx);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-items {
    display: flex;
    gap: 24px;
    font-size: 14px;
    font-weight: 500;
}

.nav-item {
    color: var(--t2);
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}

.nav-item:hover {
    color: var(--tx);
    border-bottom-color: var(--ac);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ===== Toolbar ===== */
.review-toolbar,
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.date-selector {
    background: var(--s1);
    border: 1px solid var(--s2);
    border-radius: 10px;
    padding: 0 16px;
    height: 44px;
    font-size: 14px;
    color: var(--tx);
    cursor: pointer;
    min-width: 180px;
    font-family: inherit;
    outline: none;
    transition: all .2s;
}

.date-selector:hover {
    border-color: var(--ac);
}

.date-selector:focus {
    border-color: var(--ac);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.date-selector::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    filter: invert(1);
    transition: opacity .2s;
}

.date-selector::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ===== Buttons ===== */
.btn {
    padding: 0 20px;
    height: 44px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.btn-large {
    height: 56px;
    padding: 0 32px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    font-size: 20px;
}

.btn-primary {
    background: var(--ac);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
    background: var(--s2);
    color: var(--t2);
}

.btn-secondary:hover {
    background: #475569;
    color: var(--tx);
}

/* ===== Loading Spinner ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading,
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.loading::after,
.loading-spinner::after {
    content: "";
    width: 36px;
    height: 36px;
    border: 3px solid var(--s2);
    border-top-color: var(--ac);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
    border-radius: 20px;
    padding: 40px 36px;
    margin-bottom: 28px;
    border: 1px solid var(--s2);
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--tx), var(--ac));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle,
.hero p {
    font-size: 15px;
    color: var(--t2);
    margin-top: 4px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--s1);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid var(--s2);
    transition: border-color .2s;
}

.stat-card:hover {
    border-color: var(--ac);
}

.stat-card h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--t2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--tx);
    line-height: 1.2;
}

.stat-card .small-text,
.stat-card .desc {
    font-size: 12px;
    color: var(--t2);
    margin-top: 4px;
}

/* ===== Risk Banner ===== */
.risk-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.risk-banner h3 {
    color: var(--rd);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.risk-banner ul,
.risk-banner .risk-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-banner li,
.risk-banner .risk-item {
    color: #fca5a5;
    font-size: 14px;
    padding-left: 4px;
}

.risk-banner li::before,
.risk-banner .risk-item::before {
    content: "\26A0\FE0F ";
}

/* ===== Sticky Nav (horizontal pills) ===== */
.sticky-nav {
    position: sticky;
    top: 64px;
    z-index: 90;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    margin-bottom: 24px;
    overflow-x: auto;
    display: flex;
    gap: 8px;
    scrollbar-width: none;
}

.sticky-nav::-webkit-scrollbar {
    display: none;
}

.sticky-nav .pill,
.sticky-nav a,
.sticky-nav .nav-pill {
    white-space: nowrap;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    background: var(--s1);
    border: 1px solid var(--s2);
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.sticky-nav .pill:hover,
.sticky-nav a:hover,
.sticky-nav .nav-pill:hover {
    color: var(--tx);
    background: var(--ac);
    border-color: var(--ac);
}

.sticky-nav .pill.active,
.sticky-nav a.active,
.sticky-nav .nav-pill.active {
    color: #fff;
    background: var(--ac);
    border-color: var(--ac);
}

/* ===== Section Titles ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--s2);
}

.section-header .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-badge {
    font-size: 14px;
    margin-right: 6px;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--tx);
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--s2);
}

/* ===== Score Bars ===== */
.score-bar {
    height: 8px;
    background: var(--s2);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.score-bar .fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.score-bar .fill.green,
.score-bar .fill.high {
    background: var(--gn);
}

.score-bar .fill.blue,
.score-bar .fill.mid {
    background: var(--ac);
}

.score-bar .fill.yellow,
.score-bar .fill.low-mid {
    background: var(--yw);
}

.score-bar .fill.red,
.score-bar .fill.low {
    background: var(--rd);
}

/* ===== Opportunity Cards (green section) ===== */
.opportunity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.opportunity-card {
    background: var(--s1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--s2);
    transition: all .25s;
    cursor: default;
}

.opportunity-card:hover {
    transform: translateY(-2px);
    border-color: var(--ac);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}

.opportunity-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.opportunity-card .symbol-link {
    font-size: 18px;
    font-weight: 800;
    color: var(--ac);
}

.opportunity-card .symbol-link:hover {
    color: #60a5fa;
}

.opportunity-card .score-badge {
    background: rgba(34, 197, 94, 0.15);
    color: var(--gn);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 100px;
}

.opportunity-card .info-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.opportunity-card .info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.opportunity-card .info-row .label {
    color: var(--t2);
}

.opportunity-card .info-row .val {
    font-weight: 600;
    color: var(--tx);
}

.opportunity-card .score-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.opportunity-card .score-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opportunity-card .score-bar-row .bar-label {
    font-size: 12px;
    color: var(--t2);
    width: 56px;
    flex-shrink: 0;
}

.opportunity-card .score-bar-row .score-bar {
    flex: 1;
}

.opportunity-card .score-bar-row .bar-val {
    font-size: 12px;
    font-weight: 700;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

.opportunity-card .plan-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 14px;
}

.opportunity-card .plan-box .direction-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.opportunity-card .plan-box .plan-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.opportunity-card .plan-box .plan-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.opportunity-card .plan-box .plan-row .label {
    color: var(--t2);
}

.opportunity-card .plan-box .plan-row .val {
    font-weight: 600;
}

.opportunity-card .plan-box .trigger {
    font-size: 12px;
    color: var(--t2);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--s2);
}

/* ===== Watch / Avoid Lists (yellow / red) ===== */
.watch-list,
.avoid-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.watch-item,
.avoid-item {
    background: var(--s1);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--s2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    flex: 1;
    max-width: 320px;
    transition: border-color .2s;
}

.watch-item:hover,
.avoid-item:hover {
    border-color: var(--yw);
}

.avoid-item:hover {
    border-color: var(--rd);
}

.watch-item .symbol,
.avoid-item .symbol {
    font-weight: 700;
    font-size: 14px;
    color: var(--tx);
}

.watch-item .name,
.avoid-item .name {
    font-size: 12px;
    color: var(--t2);
}

.watch-item .score-bar,
.avoid-item .score-bar {
    flex: 1;
    min-width: 60px;
}

.watch-item .direction-tag,
.avoid-item .direction-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 100px;
}

.watch-item .change,
.avoid-item .change {
    font-size: 13px;
    font-weight: 700;
}

/* ===== Ranking Table ===== */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
    font-size: 14px;
}

.ranking-table thead th {
    background: var(--s1);
    color: var(--t2);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--s2);
}

.ranking-table tbody tr {
    border-bottom: 1px solid var(--s2);
    transition: background .15s;
}

.ranking-table tbody tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.4);
}

.ranking-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

.ranking-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.ranking-table .composite-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-table .composite-col .score-bar {
    width: 80px;
    flex-shrink: 0;
}

.ranking-table .composite-col .score-val {
    font-weight: 700;
    font-size: 14px;
}

/* ===== Detail Cards ===== */
.detail-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.detail-card {
    background: var(--s1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--s2);
}

.detail-card .metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.detail-card .metric {
    display: flex;
    flex-direction: column;
}

.detail-card .metric .label {
    font-size: 11px;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-card .metric .val {
    font-size: 16px;
    font-weight: 700;
    color: var(--tx);
}

.detail-card .pivot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-card .pivot-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--s2);
    color: var(--t2);
}

.detail-card .pivot-tag.resistance {
    background: rgba(239, 68, 68, 0.15);
    color: var(--rd);
}

.detail-card .pivot-tag.support {
    background: rgba(34, 197, 94, 0.15);
    color: var(--gn);
}

.detail-card .pivot-tag.pivot {
    background: rgba(59, 130, 246, 0.15);
    color: var(--ac);
}

/* ===== Sector Cards ===== */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.sector-card {
    background: var(--s1);
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--s2);
    transition: border-color .2s;
}

.sector-card:hover {
    border-color: var(--ac);
}

.sector-card .sector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sector-card .sector-name {
    font-size: 16px;
    font-weight: 700;
}

.sector-card .heat-indicator {
    font-size: 20px;
}

.sector-card .heat-indicator.hot::after {
    content: "\1F525";
}

.sector-card .heat-indicator.cold::after {
    content: "\1F9CA";
}

.sector-card .sector-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.sector-card .sector-stat {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.sector-card .sector-stat .label {
    color: var(--t2);
}

.sector-card .sector-stat .val {
    font-weight: 600;
}

.sector-card .leader {
    font-size: 13px;
    color: var(--ac);
    font-weight: 600;
    margin-bottom: 8px;
}

.sector-card .members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sector-card .member-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--s2);
    color: var(--t2);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 40px 24px 20px;
    color: var(--t2);
    font-size: 13px;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ac);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transition: all .2s;
    z-index: 80;
    opacity: 0.85;
}

.back-to-top:hover {
    transform: translateY(-3px);
    opacity: 1;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ===== Tags / Labels ===== */
.tag,
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    line-height: 1.4;
}

.tag.bullish,
.badge.bullish,
.tag.long,
.badge.long {
    background: rgba(34, 197, 94, 0.15);
    color: var(--gn);
}

.tag.bearish,
.badge.bearish,
.tag.short,
.badge.short {
    background: rgba(239, 68, 68, 0.15);
    color: var(--rd);
}

.tag.neutral,
.badge.neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--t2);
}

.tag.caution,
.badge.caution {
    background: rgba(245, 158, 11, 0.15);
    color: var(--yw);
}

.tag.info,
.badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--ac);
}

.tag.cyan,
.badge.cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cy);
}

/* ===== Summary Section (legacy support) ===== */
.summary-header {
    background: var(--s1);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid var(--s2);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx);
}

.current-date {
    font-size: 14px;
    color: var(--t2);
    background: var(--s2);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
}

.summary-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

.summary-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rank-section {
    background: var(--s1);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--s2);
}

.rank-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--s2);
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
}

.rank-row:hover {
    background: var(--s2);
}

.rank-rank {
    width: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--t2);
    text-align: center;
}

.rank-rank.top {
    color: var(--ac);
}

.rank-name {
    flex: 1;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tx);
}

.rank-val {
    font-size: 13px;
    font-weight: 600;
}

.rank-val.up {
    color: var(--gn);
}

.rank-val.down {
    color: var(--rd);
}

.summary-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== Plan Cards (legacy support) ===== */
.plan-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--ac);
}

.plan-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-list-item {
    background: var(--s1);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--s2);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all .2s;
}

.plan-list-item:hover {
    border-color: var(--ac);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.plan-list-item.expanded {
    border-color: var(--ac);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.plan-list-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-list-code {
    font-size: 14px;
    font-weight: 700;
    color: var(--tx);
}

.plan-badge {
    font-size: 10px;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 700;
}

.plan-badge.long {
    background: rgba(34, 197, 94, 0.15);
    color: var(--gn);
}

.plan-badge.short {
    background: rgba(239, 68, 68, 0.15);
    color: var(--rd);
}

.plan-list-score {
    font-size: 12px;
    font-weight: 600;
    color: var(--ac);
    background: rgba(59, 130, 246, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.plan-list-arrow {
    font-size: 12px;
    color: var(--t2);
    transition: transform .2s;
}

.plan-list-item.expanded .plan-list-arrow {
    transform: rotate(180deg);
}

.plan-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}

.plan-detail.open {
    max-height: 600px;
}

.plan-card {
    background: var(--s1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--s2);
    margin-bottom: 16px;
    position: relative;
}

.plan-card::before {
    content: "AI";
    position: absolute;
    top: -9px;
    left: 16px;
    background: var(--ac);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
}

.plan-ai {
    background: rgba(59, 130, 246, 0.06);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--t2);
}

.plan-ai strong {
    color: var(--ac);
}

.plan-targets {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.plan-target {
    background: var(--s2);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}

.plan-target-label {
    font-size: 10px;
    color: var(--t2);
    margin-bottom: 4px;
}

.plan-target-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--tx);
}

.plan-target-val.green {
    color: var(--gn);
}

.plan-target-val.red {
    color: var(--rd);
}

.plan-target-val.neutral {
    color: var(--t2);
}

.plan-actions {
    display: flex;
    gap: 8px;
}

.plan-btn {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.plan-btn.primary {
    background: var(--ac);
    color: #fff;
}

.plan-btn.primary:hover {
    background: #2563eb;
}

.plan-btn.secondary {
    background: var(--s2);
    color: var(--t2);
}

.plan-btn.secondary:hover {
    background: #475569;
}

.plan-note {
    font-size: 10px;
    color: var(--t2);
    text-align: center;
    margin-top: 8px;
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
}

.empty-icon {
    font-size: 64px;
    opacity: 0.3;
}

.empty-text {
    font-size: 16px;
    color: var(--t2);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--s1);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    width: 92%;
    max-width: 860px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--s2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    animation: modalIn .25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--s2);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--s2);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2);
    transition: all .2s;
}

.modal-close:hover {
    background: #475569;
    color: var(--tx);
}

.modal-body {
    padding: 16px 28px 24px;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--t2);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-stat {
    background: var(--s2);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.modal-stat-label {
    font-size: 11px;
    color: var(--t2);
    margin-bottom: 4px;
}

.modal-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--tx);
}

.modal-stat-val.up {
    color: var(--gn);
}

.modal-stat-val.down {
    color: var(--rd);
}

.modal-ai-box {
    background: rgba(59, 130, 246, 0.06);
    border-radius: 12px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--t2);
}

.modal-ai-box strong {
    color: var(--ac);
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--s2);
    display: flex;
    gap: 8px;
}

/* ===== Utility: color helpers ===== */
.text-green { color: var(--gn); }
.text-red { color: var(--rd); }
.text-yellow { color: var(--yw); }
.text-blue { color: var(--ac); }
.text-cyan { color: var(--cy); }
.text-muted { color: var(--t2); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--s2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }

    .nav-items {
        gap: 12px;
        font-size: 13px;
    }

    .container {
        padding: 20px 16px;
    }

    .hero {
        padding: 28px 20px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-grid {
        grid-template-columns: 1fr;
    }

    .detail-cards {
        grid-template-columns: 1fr;
    }

    .sector-grid {
        grid-template-columns: 1fr;
    }

    .summary-layout {
        grid-template-columns: 1fr;
    }

    .summary-left {
        grid-template-columns: 1fr;
    }

    .ranking-table {
        font-size: 12px;
    }

    .ranking-table thead th,
    .ranking-table td {
        padding: 8px 10px;
    }

    .watch-list,
    .avoid-list {
        flex-direction: column;
    }

    .watch-item,
    .avoid-item {
        max-width: 100%;
    }

    .review-toolbar,
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .date-selector {
        width: 100%;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .modal-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-controls {
        width: 100%;
    }
}

/* ===== 数据日期标注 ===== */
.data-date-notice {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    padding: 10px 16px;
    margin: 10px 0;
    color: var(--yw);
    font-size: 0.9rem;
    text-align: center;
}

.data-date-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--t2);
    background: var(--s2);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.data-date-cell {
    font-size: 0.75rem;
    color: var(--t2);
    white-space: nowrap;
}

/* ===== 排序控件 ===== */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sort-label {
    font-size: 13px;
    color: var(--t2);
    margin-right: 4px;
}

.sort-btn {
    background: var(--s2);
    color: var(--t2);
    border: 1px solid transparent;
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.sort-btn:hover {
    background: #475569;
    color: var(--tx);
}

.sort-btn.active {
    background: var(--ac);
    color: #fff;
    border-color: var(--ac);
}

/* ===== 列表表格（重点关注/规避） ===== */
.list-table-wrap {
    overflow-x: auto;
    margin-bottom: 20px;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.list-table thead th {
    background: var(--s1);
    color: var(--t2);
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--s2);
    font-size: 12px;
}

.list-table tbody tr {
    border-bottom: 1px solid var(--s2);
    transition: background .15s;
}

.list-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

.list-table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

.yellow-table tbody tr:hover {
    background: rgba(245, 158, 11, 0.06);
}

.red-table tbody tr:hover {
    background: rgba(239, 68, 68, 0.06);
}

/* ===== 弹窗指标网格 ===== */
.modal-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.modal-metric {
    background: var(--s2);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mm-label {
    font-size: 11px;
    color: var(--t2);
}

.mm-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--tx);
}

/* ===== 弹窗交易计划 ===== */
.modal-plan-box {
    background: var(--s2);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mp-label {
    font-size: 12px;
    color: var(--t2);
}

.mp-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--tx);
}

.mp-val.stop {
    color: var(--rd);
}

.mp-val.target {
    color: var(--gn);
}

/* ===== 弹窗枢轴点位 ===== */
.modal-pivots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== 绿色卡片可点击样式 ===== */
.opp-card {
    transition: transform .15s, box-shadow .15s;
}

.opp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===== 排名表格行可点击 ===== */
.ranking-table tbody tr {
    transition: background .15s;
}

.ranking-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}
