/* =============================================
   Design System: Editorial Finance
   深海军蓝 + 暖金色调 · 专业金融看板
   完全采用本地字体栈，不依赖外部网络资源
   ============================================= */

:root {
    /* — Color Palette — */
    --navy-900: #0a1628;
    --navy-800: #0d1b2a;
    --navy-700: #1b2d45;
    --navy-600: #274060;

    --gold-500: #c9a96e;
    --gold-400: #d4bb84;
    --gold-300: #e0cca0;
    --gold-200: #ece2c6;
    --gold-100: #f5efe0;

    --slate-50: #f8f9fb;
    --slate-100: #f0f1f5;
    --slate-200: #e2e5eb;
    --slate-300: #cdd2da;
    --slate-400: #9ba3b2;
    --slate-500: #6b7280;
    --slate-600: #4b5563;
    --slate-700: #374151;
    --slate-800: #1f2937;
    --slate-900: #111827;

    /* — Semantic Colors — */
    --bg-canvas: #f0f1f5;
    --bg-surface: #ffffff;
    --bg-elevated: #f8f9fb;
    --bg-header: var(--gold-100);

    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-600);
    --text-muted: var(--slate-400);
    --text-inverse: #f0f1f5;

    --accent: var(--gold-500);
    --accent-hover: var(--gold-400);
    --accent-subtle: var(--gold-100);

    --border: var(--slate-200);
    --border-light: var(--slate-100);

    /* — Progress Status Colors (Chromatic Progression) — */
    --prog-board: #2c4a6e;
    --prog-board-bg: #c8d6e5;
    --prog-board-hover: #aec4da;

    --prog-shareholder: #5a3d7a;
    --prog-shareholder-bg: #d5c8e8;
    --prog-shareholder-hover: #c1aed9;

    --prog-exchange: #1a5c5c;
    --prog-exchange-bg: #b8dede;
    --prog-exchange-hover: #9acece;

    --prog-committee: #2d5e1e;
    --prog-committee-bg: #c2dfb2;
    --prog-committee-hover: #a8cf95;

    --prog-registration: #7a5c0a;
    --prog-registration-bg: #f6d98c;
    --prog-registration-hover: #edc860;

    --prog-subscription: #8c3520;
    --prog-subscription-bg: #f0b8a0;
    --prog-subscription-hover: #e49a7c;

    --prog-listing: #0e5e38;
    --prog-listing-bg: #a0d4b8;
    --prog-listing-hover: #82c2a0;

    /* — Spacing — */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;

    /* — Radii — */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-full: 9999px;

    /* — Transitions — */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-base: 200ms;

    /* — Shadows — */
    --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.05);
    --shadow-md: 0 2px 8px rgba(10, 22, 40, 0.08);
    --shadow-lg: 0 4px 16px rgba(10, 22, 40, 0.12);
    --shadow-gold: 0 2px 12px rgba(201, 169, 110, 0.25);
}

/* — Reset — */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "SF Pro Display", "Noto Sans SC", "PingFang SC",
                 "Microsoft YaHei UI", system-ui, -apple-system,
                 BlinkMacSystemFont, sans-serif;
    background: var(--bg-canvas);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* — Main Card Container — */
.table-card {
    max-width: 100%;
    margin: 0;
    background: var(--bg-surface);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* — Header: Dark Navy + Gold Accent — */
.table-header {
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-header);
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: var(--shadow-md);
}

.title-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.title-section h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-800);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    letter-spacing: 0.5px;
}

/* Gold accent bar before title */
.title-section h1::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--navy-700);
    border-radius: 2px;
}

.title-section p {
    font-size: 0.8rem;
    color: var(--slate-400);
    margin-top: 0;
}

/* — Record Counter (in header) — */
.table-footer {
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    font-size: 0.8rem;
    color: var(--slate-500);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.total-records {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 22, 40, 0.06);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--slate-600);
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(10, 22, 40, 0.08);
}

.total-records span:nth-child(2) {
    color: var(--navy-700);
    font-weight: 700;
    font-size: 1rem;
    min-width: 1.5ch;
    text-align: center;
}

/* — Control Buttons — */
.view-controls {
    display: flex;
    gap: var(--space-sm);
}

.toggle-btn {
    background: rgba(10, 22, 40, 0.05);
    border: 1px solid rgba(10, 22, 40, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    color: var(--slate-600);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: inherit;
    letter-spacing: 0.2px;
}

.toggle-btn i {
    font-style: normal;
    font-size: 0.9rem;
}

.toggle-btn.active {
    background: var(--navy-700);
    border-color: var(--navy-700);
    color: #ffffff;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.toggle-btn:not(.active):hover {
    background: rgba(10, 22, 40, 0.1);
    border-color: rgba(10, 22, 40, 0.18);
    color: var(--navy-800);
}

.toggle-btn:active {
    transform: scale(0.97);
}

/* — Table Scroll Wrapper — */
.table-scroll-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Custom scrollbar */
.table-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--slate-100);
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* — Data Table Core — */
.data-table {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
    background: var(--bg-surface);
    font-family: inherit;
    min-width: 100%;
}

/* — Sticky Table Header — */
.data-table thead tr th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--slate-50);
    padding: var(--space-sm) var(--space-xs);
    text-align: center;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--slate-700);
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    text-transform: none;
    box-shadow: 0 1px 4px rgba(10, 22, 40, 0.1);
}

.data-table thead tr th:hover {
    background: var(--slate-200);
    color: var(--navy-800);
}

/* Sort indicator — subtle arrow */
.sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.65rem;
    opacity: 0.35;
    transition: opacity var(--duration-fast) ease, color var(--duration-fast) ease;
    vertical-align: middle;
}

th:hover .sort-indicator {
    opacity: 0.7;
}

/* — Table Body — */
.data-table tbody td {
    padding: 6px var(--space-xs);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 400;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    transition: background-color 120ms ease;
}

/* — Row Hover: Gold accent bar + deeper background shift — */
.data-table tbody tr {
    transition: background-color 120ms ease;
}

/* Base hover: neutral rows get a warm amber tint */
.data-table tbody tr:hover td {
    background-color: #fae8c0 !important;
    position: relative;
}

/* Gold left-edge indicator on hovered row */
.data-table tbody tr:hover td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

/* — Progress Status Colors (Chromatic Progression) — */

/* 1. 董事会预案 — Cool Steel Blue */
.progress-board { background-color: var(--prog-board-bg); }
.progress-board td { background-color: var(--prog-board-bg) !important; }
.progress-board:hover td { background-color: var(--prog-board-hover) !important; }

/* 2. 股东大会通过 — Dusty Violet */
.progress-shareholder { background-color: var(--prog-shareholder-bg); }
.progress-shareholder td { background-color: var(--prog-shareholder-bg) !important; }
.progress-shareholder:hover td { background-color: var(--prog-shareholder-hover) !important; }

/* 3. 交易所受理 — Ocean Teal */
.progress-exchange { background-color: var(--prog-exchange-bg); }
.progress-exchange td { background-color: var(--prog-exchange-bg) !important; }
.progress-exchange:hover td { background-color: var(--prog-exchange-hover) !important; }

/* 4. 上市委通过 — Fresh Sage */
.progress-committee { background-color: var(--prog-committee-bg); }
.progress-committee td { background-color: var(--prog-committee-bg) !important; }
.progress-committee:hover td { background-color: var(--prog-committee-hover) !important; }

/* 5. 同意注册 — Warm Amber */
.progress-registration { background-color: var(--prog-registration-bg); }
.progress-registration td { background-color: var(--prog-registration-bg) !important; }
.progress-registration:hover td { background-color: var(--prog-registration-hover) !important; }

/* 6. 申购 — Terracotta */
.progress-subscription { background-color: var(--prog-subscription-bg); }
.progress-subscription td { background-color: var(--prog-subscription-bg) !important; }
.progress-subscription:hover td { background-color: var(--prog-subscription-hover) !important; }

/* 7. 上市 — Deep Jade */
.progress-listing { background-color: var(--prog-listing-bg); }
.progress-listing td { background-color: var(--prog-listing-bg) !important; }
.progress-listing:hover td { background-color: var(--prog-listing-hover) !important; }

/* — Status Badge — */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
    font-family: inherit;
    line-height: 1.6;
}

.status-badge.pending {
    background: var(--prog-registration-bg);
    color: var(--prog-registration);
    border: 1px solid rgba(181, 139, 26, 0.2);
}

.status-badge.cancelled {
    background: var(--prog-subscription-bg);
    color: var(--prog-subscription);
    border: 1px solid rgba(181, 69, 42, 0.2);
}

/* — Small text for conception column — */
.small-text {
    font-size: 0.7rem;
}

.data-table td.small-text {
    width: 100%;
    min-width: 50px;
    white-space: normal;
    word-break: break-all;
    box-sizing: border-box;
}

/* — Links: Subtle Gold Accent on Hover — */
.data-table a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    transition: color var(--duration-fast) ease;
}

.data-table a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* — Amount Cell — */
.amount-cell {
    font-weight: 600;
    color: var(--slate-800);
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
}

/* — No Data State — */
.no-data {
    text-align: center;
    padding: 4rem var(--space-xl) !important;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.no-data-icon {
    display: block;
    margin: 0 auto var(--space-md);
    width: 40px;
    height: 40px;
    opacity: 0.35;
}

.stock-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    border-bottom: 1px dashed var(--border-light);
}

.stock-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* — Responsive — */
@media (max-width: 640px) {
    .table-header {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .title-section h1 {
        font-size: 1.05rem;
    }

    .view-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .toggle-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.75rem;
    }
}

/* — Print Styles — */
@media print {
    .table-header {
        position: static;
        background: #f5efe0;
        border-bottom: 2px solid #333;
        color: #333;
        box-shadow: none;
    }

    .title-section h1 {
        color: #333;
    }

    .title-section h1::before {
        background: #333;
    }

    .total-records {
        background: #eee;
        color: #333;
        border-color: #ccc;
    }

    .total-records span:nth-child(2) {
        color: #333;
    }

    .toggle-btn {
        display: none;
    }

    .table-scroll-wrapper {
        overflow: visible;
    }
}

.tab-panel {
    display: none;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
}

.tab-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 var(--space-sm);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .tab-separator {
        display: none;
    }
}

/* =============================================
   Stock Panel Styles
   ============================================= */

.stock-panel {
    --sp-bg-primary: #f3f4f6;
    --sp-bg-secondary: #e9eaee;
    --sp-bg-card: #ffffff;
    --sp-bg-card-hover: #f7f8fa;
    --sp-bg-glass: #ffffff;
    --sp-border-subtle: #e5e7eb;
    --sp-border-light: #d1d5db;
    --sp-border-accent: #2563eb;
    --sp-text-primary: #111827;
    --sp-text-secondary: #4b5563;
    --sp-text-muted: #6b7280;
    --sp-color-up: #dc2626;
    --sp-color-down: #059669;
    --sp-color-flat: #78838f;
    --sp-accent-primary: #2563eb;
    --sp-accent-secondary: #1d4ed8;
    --sp-accent-glow: rgba(37, 99, 235, 0.12);
    --sp-accent-light: #eff6ff;
    --sp-ma20-color: #e8534a;
    --sp-ma60-color: #3b82f6;
    --sp-ma120-color: #8b5cf6;
    --sp-ma250-color: #06b6d4;
    --sp-volume-up: rgba(220, 38, 38, 0.5);
    --sp-volume-down: rgba(5, 150, 105, 0.5);
    --sp-percentile-color: #d97706;
    --sp-shadow-sm: none;
    --sp-shadow-md: none;
    --sp-shadow-lg: none;
    --sp-shadow-glow: none;
    --sp-radius-sm: 4px;
    --sp-radius-md: 6px;
    --sp-radius-lg: 8px;
    --sp-space-xs: 4px;
    --sp-space-sm: 8px;
    --sp-space-md: 16px;
    --sp-space-lg: 24px;
    --sp-space-xl: 32px;
    --sp-transition-fast: 150ms ease;
    --sp-transition-normal: 250ms ease;
    --sp-transition-slow: 400ms ease;

    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--sp-bg-primary);
    color: var(--sp-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: auto;
    flex: 1;
    position: relative;
    transition: background var(--sp-transition-slow), color var(--sp-transition-normal);
}

.stock-panel *,
.stock-panel *::before,
.stock-panel *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.stock-panel .sp-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--sp-space-lg) var(--sp-space-lg);
}

.stock-panel .sp-header {
    text-align: center;
    padding: var(--sp-space-sm) 0 var(--sp-space-md);
    position: relative;
}

.stock-panel .sp-header::after {
    content: none;
}

.stock-panel .sp-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-space-sm);
}

.stock-panel .sp-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--sp-text-primary);
    letter-spacing: -0.3px;
    padding-bottom: var(--sp-space-sm);
    border-bottom: 2px solid var(--sp-accent-primary);
    display: inline-block;
    line-height: 1.3;
}

.stock-panel .sp-main-layout {
    display: flex;
    gap: var(--sp-space-lg);
    margin-bottom: var(--sp-space-lg);
    align-items: stretch;
    transition: flex-direction var(--sp-transition-normal), gap var(--sp-transition-normal);
}

.stock-panel .sp-grid-control-panel {
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius-lg);
    padding: var(--sp-space-lg);
    border: 1px solid var(--sp-border-subtle);
    position: relative;
    overflow: hidden;
    min-width: 150px;
    max-width: 320px;
    flex-shrink: 0;
    transition: border-color var(--sp-transition-fast);
}

.stock-panel .sp-grid-control-panel:hover {
    border-color: var(--sp-border-light);
}

.stock-panel .sp-grid-control-panel::before {
    content: none;
}

.stock-panel .sp-grid-control-header {
    margin-bottom: var(--sp-space-md);
}

.stock-panel .sp-grid-calc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    line-height: 1.4;
}

.stock-panel .sp-grid-control-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--sp-space-md);
    margin-bottom: var(--sp-space-lg);
}

.stock-panel .sp-grid-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-space-xs);
}

.stock-panel .sp-grid-input-group label {
    font-size: 11px;
    color: var(--sp-text-secondary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.stock-panel .sp-grid-input-group input {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border-light);
    border-radius: var(--sp-radius-sm);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-text-primary);
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
    transition: border-color var(--sp-transition-fast);
    outline: none;
    width: 100%;
}

.stock-panel .sp-grid-input-group input:focus {
    border-color: var(--sp-accent-primary);
    outline: 2px solid rgba(37, 99, 235, 0.3);
    outline-offset: -1px;
}

.stock-panel .sp-grid-input-group input::placeholder {
    color: var(--sp-text-muted);
    font-weight: 400;
}

.stock-panel .sp-grid-calc-btn {
    background: var(--sp-accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-sm);
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--sp-transition-fast), outline-color var(--sp-transition-fast);
    letter-spacing: 0.5px;
    width: 100%;
    font-family: inherit;
    min-height: 44px;
}

.stock-panel .sp-grid-calc-btn:hover {
    background: var(--sp-accent-secondary);
}

.stock-panel .sp-grid-calc-btn:active {
    background: #1e40af;
}

.stock-panel .sp-grid-calc-btn:focus-visible {
    outline: 2px solid var(--sp-accent-primary);
    outline-offset: 2px;
}

.stock-panel .sp-grid-calc-btn-secondary {
    background: var(--sp-bg-glass);
    color: var(--sp-text-secondary);
    border: 1px solid var(--sp-border-light);
    box-shadow: none;
}

.stock-panel .sp-grid-calc-btn-secondary:hover {
    background: var(--sp-bg-card-hover);
    box-shadow: none;
}

.stock-panel .sp-chart-section {
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius-lg);
    padding: var(--sp-space-lg) var(--sp-space-lg) var(--sp-space-sm);
    border: 1px solid var(--sp-border-subtle);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    transition: border-color var(--sp-transition-fast);
}

.stock-panel .sp-chart-section:hover {
    border-color: var(--sp-border-light);
}

.stock-panel .sp-chart-section::before {
    content: none;
}

.stock-panel .sp-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-space-md);
}

.stock-panel .sp-chart-header-right {
    display: flex;
    align-items: center;
    gap: var(--sp-space-md);
}

.stock-panel .sp-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    line-height: 1.4;
}

.stock-panel .sp-time-range-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--sp-space-md);
    flex-wrap: wrap;
}

.stock-panel .sp-time-range-divider {
    width: 1px;
    height: 18px;
    background: var(--sp-border-light);
    margin: 0 4px;
    flex-shrink: 0;
}

.stock-panel .sp-time-range-btn {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text-muted);
    padding: 4px 14px;
    border-radius: var(--sp-radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition-fast);
    letter-spacing: 0.5px;
    font-family: inherit;
    min-height: 30px;
}

.stock-panel .sp-time-range-btn:hover {
    background: var(--sp-bg-card-hover);
    border-color: var(--sp-border-light);
    color: var(--sp-text-primary);
}

.stock-panel .sp-time-range-btn.active {
    background: var(--sp-accent-light);
    border-color: var(--sp-border-subtle);
    color: var(--sp-accent-primary);
    font-weight: 700;
}

.stock-panel .sp-time-range-btn:active {
    background: var(--sp-border-subtle);
}

.stock-panel .sp-time-range-btn:focus-visible {
    outline: 2px solid var(--sp-accent-primary);
    outline-offset: 2px;
}

.stock-panel .sp-data-range-info {
    font-size: 11px;
    color: var(--sp-text-secondary);
    margin-bottom: var(--sp-space-sm);
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.stock-panel .sp-vol-toggle-btn {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text-muted);
    padding: 3px 10px;
    border-radius: var(--sp-radius-sm);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition-fast);
    font-family: inherit;
    min-height: 30px;
}

.stock-panel .sp-vol-toggle-btn:hover {
    background: var(--sp-bg-card-hover);
    border-color: var(--sp-border-light);
    color: var(--sp-text-primary);
}

.stock-panel .sp-vol-toggle-btn.active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #b45309;
    font-weight: 700;
}

.stock-panel .sp-vol-toggle-btn:active {
    background: var(--sp-border-subtle);
}

.stock-panel .sp-vol-toggle-btn:focus-visible {
    outline: 2px solid var(--sp-accent-primary);
    outline-offset: 2px;
}

.stock-panel .sp-main-chart {
    width: 100%;
    height: 600px;
    position: relative;
}

.stock-panel .sp-main-chart::before {
    content: none;
}

.stock-panel .sp-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 246, 248, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity var(--sp-transition-slow);
}

.stock-panel .sp-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.stock-panel .sp-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-space-lg);
}

.stock-panel .sp-loading-spinner {
    width: 48px;
    height: 48px;
    position: relative;
}

.stock-panel .sp-loading-spinner::before,
.stock-panel .sp-loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.stock-panel .sp-loading-spinner::before {
    inset: 0;
    border: 2px solid var(--sp-border-light);
}

.stock-panel .sp-loading-spinner::after {
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--sp-accent-primary);
    animation: sp-spin 0.8s linear infinite;
}

.stock-panel .sp-loading-spinner-inner {
    position: absolute;
    inset: 6px;
    border: 2px solid transparent;
    border-bottom-color: var(--sp-color-up);
    border-radius: 50%;
    animation: sp-spin 0.6s linear infinite reverse;
}

@keyframes sp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stock-panel .sp-loading-text {
    font-size: 14px;
    color: var(--sp-text-secondary);
    letter-spacing: 0.5px;
}

.stock-panel .sp-loading-dots {
    display: inline-flex;
    gap: 4px;
}

.stock-panel .sp-loading-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sp-accent-primary);
    animation: sp-bounce-dot 1.4s infinite ease-in-out both;
}

.stock-panel .sp-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.stock-panel .sp-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes sp-bounce-dot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.stock-panel .sp-error-message {
    text-align: center;
    padding: var(--sp-space-xl);
    color: var(--sp-color-up);
    font-size: 14px;
    line-height: 1.8;
}

.stock-panel .sp-error-message .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--sp-space-md);
    opacity: 0.8;
}

.stock-panel .sp-error-message button {
    margin-top: var(--sp-space-md);
    padding: 10px 24px;
    background: var(--sp-accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--sp-transition-fast);
    font-family: inherit;
    min-height: 44px;
}

.stock-panel .sp-error-message button:hover {
    background: var(--sp-accent-secondary);
}

.stock-panel .sp-error-message button:focus-visible {
    outline: 2px solid var(--sp-accent-primary);
    outline-offset: 2px;
}

.stock-panel .sp-grid-result-section {
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius-lg);
    padding: var(--sp-space-lg);
    border: 1px solid var(--sp-border-subtle);
    position: relative;
    overflow: hidden;
    margin-top: var(--sp-space-lg);
    transition: border-color var(--sp-transition-fast);
}

.stock-panel .sp-grid-result-section:hover {
    border-color: var(--sp-border-light);
}

.stock-panel .sp-grid-result-section::before {
    content: none;
}

.stock-panel .sp-grid-table-wrapper {
    overflow-x: auto;
    border-radius: var(--sp-radius-md);
    border: 1px solid var(--sp-border-light);
}

.stock-panel .sp-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
}

.stock-panel .sp-grid-table thead {
    background: var(--sp-accent-light);
}

.stock-panel .sp-grid-table th {
    padding: 10px 14px;
    text-align: right;
    font-weight: 700;
    color: var(--sp-accent-primary);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--sp-accent-primary);
    white-space: nowrap;
}

.stock-panel .sp-grid-table th:first-child {
    text-align: center;
}

.stock-panel .sp-grid-table td {
    padding: 9px 14px;
    text-align: right;
    color: var(--sp-text-primary);
    border-bottom: 1px solid var(--sp-border-subtle);
    white-space: nowrap;
    transition: background var(--sp-transition-fast);
}

.stock-panel .sp-grid-table td:first-child {
    text-align: center;
    color: var(--sp-text-muted);
    font-weight: 600;
}

.stock-panel .sp-grid-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.stock-panel .sp-grid-table tbody tr:hover {
    background: var(--sp-accent-light);
}

.stock-panel .sp-grid-table tbody tr {
    transition: background var(--sp-transition-fast);
}

.stock-panel .sp-grid-table tbody tr:last-child td {
    border-bottom: none;
}

.stock-panel .sp-grid-table .cell-buy {
    color: var(--sp-color-down);
    font-weight: 500;
}

.stock-panel .sp-grid-table .cell-rate {
    color: var(--sp-accent-primary);
    font-weight: 500;
}

.stock-panel .sp-grid-table .cell-drop {
    color: var(--sp-color-up);
    font-weight: 500;
}

.stock-panel .sp-grid-table .cell-return {
    font-weight: 500;
}

.stock-panel .sp-grid-table .cell-return.positive {
    color: var(--sp-color-up);
}

.stock-panel .sp-grid-table .cell-return.negative {
    color: var(--sp-color-down);
}

.stock-panel .sp-grid-summary {
    margin-top: var(--sp-space-md);
    padding: var(--sp-space-md);
    background: var(--sp-accent-light);
    border-radius: var(--sp-radius-md);
    border: 1px solid var(--sp-border-subtle);
    font-size: 13px;
    color: var(--sp-text-secondary);
    line-height: 1.8;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

@media (max-width: 1024px) {
    .stock-panel .sp-main-chart {
        height: 520px;
    }
    .stock-panel .sp-main-layout {
        gap: var(--sp-space-md);
    }
    .stock-panel .sp-time-range-bar {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .stock-panel {
        font-size: 15px;
    }
    .stock-panel .sp-container {
        padding: 0 var(--sp-space-md) var(--sp-space-sm);
    }
    .stock-panel .sp-header {
        padding: var(--sp-space-sm) 0 var(--sp-space-md);
    }
    .stock-panel .sp-header h1 {
        font-size: 22px;
    }
    .stock-panel .sp-header-content {
        gap: 2px;
    }
    /* 主布局：纵向堆叠，间距12px */
    .stock-panel .sp-main-layout {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    /* 网格计算器：占满宽度，输入框2列布局 */
    .stock-panel .sp-grid-control-panel {
        min-width: 100%;
        max-width: 100%;
        padding: var(--sp-space-md);
        height: auto;
    }
    .stock-panel .sp-grid-control-header {
        margin-bottom: var(--sp-space-sm);
    }
    .stock-panel .sp-grid-calc-title {
        font-size: 15px;
    }
    .stock-panel .sp-grid-control-inputs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sp-space-xs) var(--sp-space-sm);
        margin-bottom: var(--sp-space-md);
    }
    .stock-panel .sp-grid-input-group input {
        padding: 8px 6px;
        font-size: 14px;
        min-height: 32px;
    }
    .stock-panel .sp-grid-input-group label {
        font-size: 11px;
    }
    /* 技术分析区域：自适应宽度 */
    .stock-panel .sp-chart-section {
        padding: var(--sp-space-sm) var(--sp-space-md);
        height: auto;
        width: 100%;
        max-width: 100%;
    }
    .stock-panel .sp-main-chart {
        height: 400px;
    }
    .stock-panel .sp-chart-header {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
        margin-bottom: var(--sp-space-sm);
    }
    .stock-panel .sp-chart-title {
        font-size: 15px;
    }
    .stock-panel .sp-time-range-bar {
        gap: 6px;
        margin-bottom: var(--sp-space-sm);
        flex-wrap: wrap;
    }
    .stock-panel .sp-time-range-break {
        width: 100%;
        height: 0;
        margin: 0;
        visibility: hidden;
    }
    .stock-panel .sp-time-range-btn {
        padding: 5px 10px;
        font-size: 13px;
        min-height: 32px;
        flex: 1 1 auto;
        text-align: center;
    }
    .stock-panel .sp-vol-toggle-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    .stock-panel .sp-grid-calc-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-height: 44px;
    }
    /* 网格结果表格：横向滚动、固定表头 */
    .stock-panel .sp-grid-result-section {
        padding: var(--sp-space-sm) var(--sp-space-md);
        margin-top: var(--sp-space-md);
    }
    .stock-panel .sp-grid-table-wrapper {
        max-height: 50vh;
        overflow-y: auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .stock-panel .sp-grid-table {
        font-size: 14px;
    }
    .stock-panel .sp-grid-table thead {
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .stock-panel .sp-grid-table thead th {
        background: var(--sp-bg-primary);
        box-shadow: 0 1px 0 var(--sp-border-subtle);
        padding: 10px 12px;
        font-size: 13px;
    }
    .stock-panel .sp-grid-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .stock-panel .sp-container {
        padding: var(--sp-space-xs) var(--sp-space-sm);
    }
    .stock-panel .sp-header h1 {
        font-size: 18px;
    }
    .stock-panel .sp-main-chart {
        height: 300px;
    }
    .stock-panel .sp-chart-section {
        border-radius: var(--sp-radius-md);
        padding: var(--sp-space-xs) var(--sp-space-sm);
        height: auto;
        width: 100%;
        max-width: 100%;
    }
    .stock-panel .sp-grid-control-panel {
        border-radius: var(--sp-radius-md);
        padding: var(--sp-space-sm);
        height: auto;
    }
    .stock-panel .sp-grid-calc-title {
        font-size: 14px;
    }
    .stock-panel .sp-grid-control-inputs {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sp-space-xs) var(--sp-space-xs);
    }
    .stock-panel .sp-grid-input-group input {
        padding: 8px 4px;
        font-size: 13px;
        min-height: 24px;
    }
    .stock-panel .sp-grid-input-group label {
        font-size: 10px;
    }
    .stock-panel .sp-chart-title {
        font-size: 14px;
    }
    .stock-panel .sp-time-range-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 36px;
        flex: 1 1 0%;
        text-align: center;
    }
    .stock-panel .sp-vol-toggle-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 36px;
    }
    .stock-panel .sp-grid-calc-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
    }
    .stock-panel .sp-grid-result-section {
        border-radius: var(--sp-radius-md);
        padding: var(--sp-space-xs) var(--sp-space-sm);
        margin-top: var(--sp-space-sm);
    }
    .stock-panel .sp-grid-table {
        font-size: 13px;
    }
    .stock-panel .sp-grid-table thead th {
        padding: 8px 10px;
        font-size: 12px;
    }
    .stock-panel .sp-grid-table td {
        padding: 8px 10px;
    }
    .stock-panel .sp-data-range-info {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .stock-panel .sp-header h1 {
        font-size: 16px;
    }
    .stock-panel .sp-main-chart {
        height: 250px;
    }
    .stock-panel .sp-grid-calc-title {
        font-size: 13px;
    }
    .stock-panel .sp-grid-input-group input {
        font-size: 12px;
        padding: 6px 3px;
        min-height: 24px;
    }
    .stock-panel .sp-grid-input-group label {
        font-size: 9px;
    }
    .stock-panel .sp-chart-title {
        font-size: 13px;
    }
    .stock-panel .sp-time-range-btn {
        font-size: 11px;
        padding: 5px 8px;
        min-height: 34px;
    }
    .stock-panel .sp-vol-toggle-btn {
        font-size: 10px;
        padding: 5px 8px;
        min-height: 34px;
    }
    .stock-panel .sp-grid-calc-btn {
        font-size: 13px;
        padding: 8px 12px;
        min-height: 44px;
    }
    .stock-panel .sp-grid-table {
        font-size: 12px;
    }
    .stock-panel .sp-grid-table thead th {
        padding: 8px 8px;
        font-size: 11px;
    }
    .stock-panel .sp-grid-table td {
        padding: 8px 8px;
    }
}

@media print {
    .stock-panel {
        background: white;
        color: black;
    }
    .stock-panel .sp-loading-overlay {
        display: none;
    }
    .stock-panel .sp-chart-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stock-panel,
    .stock-panel *,
    .stock-panel *::before,
    .stock-panel *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .sp-realtime-refresh-indicator {
        animation: none !important;
        opacity: 1;
    }
    .sp-loading-spinner::after {
        animation: none !important;
    }
    .sp-loading-spinner-inner {
        animation: none !important;
    }
    .sp-loading-dots span {
        animation: none !important;
        opacity: 0.5;
    }
}

/* — Real-time Quote Bar — */
.sp-realtime-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-space-xs) var(--sp-space-md);
    padding: var(--sp-space-xs) var(--sp-space-md);
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border-subtle);
    border-radius: var(--sp-radius-lg);
    margin: 0 auto var(--sp-space-sm);
    transition: opacity var(--sp-transition-normal), border-color var(--sp-transition-fast);
    overflow-x: auto;
    position: relative;
}

.sp-realtime-bar:hover {
    border-color: var(--sp-border-light);
}
.sp-realtime-bar.hidden-bar {
    opacity: 0.3;
    pointer-events: none;
}
.sp-realtime-divider {
    display: inline-block;
    width: 0;
    height: 20px;
    border-left: 1px solid var(--sp-border-light);
    margin: 0 var(--sp-space-xs);
    flex-shrink: 0;
    align-self: center;
}
.sp-realtime-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 60px;
}
.sp-realtime-label {
    font-size: 0.6rem;
    color: var(--sp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.sp-realtime-value {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
    color: var(--sp-text-primary);
    transition: color var(--sp-transition-fast);
    line-height: 1.3;
}
.sp-realtime-value.up { color: var(--sp-color-up); }
.sp-realtime-value.down { color: var(--sp-color-down); }
.sp-realtime-value.flat { color: var(--sp-color-flat); }
.sp-realtime-last-update {
    flex-direction: row;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--sp-text-muted);
    min-width: auto;
}
.sp-realtime-refresh-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 4px;
    animation: sp-pulse 2s ease-in-out infinite;
}
.sp-realtime-refresh-indicator.paused {
    background: var(--sp-text-muted);
    animation: none;
}
@keyframes sp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.sp-realtime-price-large {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}
.sp-bond-multiline { line-height: 1.5; text-align: center; }
.sp-bond-share-line { display: block; line-height: 1.6; }
.sp-bond-ratio { font-size: 0.72rem; color: var(--sp-text-muted, #8a8f98); font-weight: 400; }
.sp-bond-extra-lines { display: none; flex-direction: column; align-items: center; margin-top: 2px; padding-top: 2px; border-top: 1px solid var(--sp-border-subtle, #e2e4e9); }
.sp-bond-extra-line { color: var(--sp-text-secondary, #5a6070); font-size: 0.88rem; font-weight: 600; }
.sp-bond-extra-tag { display: inline-block; font-size: 0.62rem; font-weight: 600; color: #fff; background: var(--navy-600, #4a6fa5); border-radius: 2px; padding: 0 3px; margin-right: 2px; vertical-align: middle; line-height: 1.4; }
.sp-bond-info-item.toggle-btn {
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: var(--radius-sm, 4px);
    white-space: nowrap;
    height: fit-content;
    align-self: center;
    min-height: 36px;
    cursor: pointer;
}

.sp-bond-info-item.toggle-btn:focus-visible {
    outline: 2px solid var(--sp-accent-primary, #2563eb);
    outline-offset: 2px;
}
@media (max-width: 640px) {
    .sp-realtime-bar {
        flex-wrap: wrap;
        gap: var(--space-xs) var(--space-sm);
        padding: var(--space-xs) var(--space-sm);
    }
    .sp-realtime-item { min-width: 48px; }
    .sp-realtime-value { font-size: 0.8rem; }
    .sp-realtime-price-large { font-size: 1.1rem; }
    .sp-bond-multiline { font-size: 0.8rem; }
    .sp-bond-ratio { font-size: 0.65rem; }
    .sp-bond-extra-line { font-size: 0.78rem; }
    .sp-bond-extra-tag { font-size: 0.58rem; }
    .sp-bond-info-item.toggle-btn { font-size: 0.65rem; padding: 2px 8px; }
}

/* 配债分析弹窗 */
.sp-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: spModalIn 0.2s ease;
}
.sp-modal-content {
    background: #fff;
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border-subtle);
    max-width: 640px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
}
@keyframes spModalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.sp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.sp-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}
.sp-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.15s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.sp-modal-close:hover { color: #333; }

.sp-modal-close:focus-visible {
    outline: 2px solid var(--sp-accent-primary, #2563eb);
    outline-offset: 2px;
}
.sp-modal-body {
    padding: 16px 20px 20px;
}
.sp-analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.sp-analysis-table thead th {
    background: #f5f7fa;
    color: #555;
    font-weight: 600;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
    font-size: 0.82rem;
}
.sp-analysis-table tbody td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.sp-analysis-table tbody tr:hover {
    background: #f8fafd;
}

.sp-analysis-table tbody tr {
    transition: background 120ms ease;
}
.sp-analysis-table tbody td strong {
    color: #1a1a2e;
}
.sp-analysis-notes {
    margin-top: 14px;
    padding: 10px 12px;
    background: #f5f7fa;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.7;
}
.sp-analysis-notes p { margin: 0; }

/* 配债分析按钮禁用态 */
.sp-bond-info-item.toggle-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(10,22,40,0.03);
    border-color: rgba(10,22,40,0.06);
    color: #aaa;
}

@media (max-width: 640px) {
    .sp-modal-content { width: 96%; max-height: 90vh; }
    .sp-analysis-table { font-size: 0.78rem; }
    .sp-analysis-table thead th,
    .sp-analysis-table tbody td { padding: 8px 5px; }
    .sp-modal-header { padding: 12px 14px; }
    .sp-modal-body { padding: 12px 14px 16px; }
}

/* ===== 从 JS 迁移的内联样式 ===== */

/* 加载动画 */
.cb-loading-td { padding: 2rem 16px; }
.cb-loading-container { text-align: center; padding: 20px; }
.cb-loading-spinner {
    width: 36px; height: 36px;
    margin: 0 auto 12px;
    border: 3px solid #e2e5eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: cbSpin 0.8s linear infinite;
}
@keyframes cbSpin { to { transform: rotate(360deg); } }
.cb-loading-text { font-size: 14px; color: #6b7280; font-weight: 500; }

/* 错误显示 */
.cb-error-td { padding: 2rem 16px; }
.cb-error-container { text-align: center; padding: 20px; }
.cb-error-icon { font-size: 32px; color: #cf2e2e; margin-bottom: 8px; }
.cb-error-title { font-size: 16px; font-weight: 700; color: #1a1d23; margin-bottom: 4px; }
.cb-error-message { font-size: 13px; color: #5a6070; line-height: 1.5; }
.cb-error-retry-btn {
    margin-top: 12px; padding: 8px 24px;
    font-size: 13px; font-weight: 600;
    color: #fff; background: #2563eb;
    border: none; border-radius: 6px; cursor: pointer;
}
.cb-error-retry-btn:hover { background: #1d4ed8; }

/* 条件颜色（使用 CSS 变量） */
.text-prog-subscription { color: var(--prog-subscription); }
.text-prog-listing { color: var(--prog-listing); }
.cb-price-change { font-size: 0.85em; }

/* 配债分析弹窗安全垫高亮 */
.ba-sm-highlight { color: var(--prog-subscription, #e8534a); }
.ba-ratio-min { background: rgba(232, 83, 74, 0.18); }

/* ECharts tooltip */
.sp-tooltip-date { font-weight: 600; margin-bottom: 8px; color: #2563eb; }
.sp-tooltip-ohlc { margin-bottom: 4px; }
.sp-tooltip-ohlc-label { opacity: 0.7; }
.sp-tooltip-hl { font-size: 11px; color: #5a6070; }
.sp-tooltip-ma-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.sp-tooltip-ma-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.sp-tooltip-ma-name { color: #5a6070; font-size: 11px; }
.sp-tooltip-ma-value { font-weight: 500; }
.sp-tooltip-vol-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e2e6ec; font-size: 11px; color: #5a6070; }
.sp-tooltip-vol-value { color: #1a1d23; font-weight: 500; }
.sp-tooltip-pct-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e2e6ec; }
.sp-tooltip-pct-label { font-size: 11px; color: #5a6070; }
.sp-tooltip-pct-value { font-weight: 600; }
.sp-tooltip-price-label { font-size: 11px; color: #5a6070; margin-left: 8px; }
.sp-tooltip-price-value { font-weight: 500; }
.sp-tooltip-pct-tag { font-size: 11px; color: #5a6070; margin-left: 4px; }

/* 图表错误信息 */
.sp-chart-error-detail { font-size: 12px; color: #5a6070; margin-top: 8px; }

/* 网格表格百分位标签 */
.sp-grid-pct-tag { font-size: 10px; }

/* =============================================
   Tab Navigation Styles (from ConvertibleBond_dashboard.css)
   标签页切换样式
   ============================================= */

/* ===== 标签页导航栏 ===== */
.main-tab-nav {
    display: flex;
    align-items: center;
    gap: 0;
    background: #ffffff;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e2e5eb;
    height: 48px;
}

.main-tab-btn {
    position: relative;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    padding: 0 24px;
    height: 100%;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-tab-btn:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.03);
}

.main-tab-btn.active {
    color: #1a1d23;
    font-weight: 600;
}

.main-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    background: linear-gradient(90deg, #c9a96e, #d4bb84);
    border-radius: 3px 3px 0 0;
    animation: tabIndicatorIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tabIndicatorIn {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}

.main-tab-btn .tab-icon {
    font-size: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.main-tab-btn.active .tab-icon {
    opacity: 1;
}

/* ===== 标签页内容区域 ===== */
.tab-content {
    display: none;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    animation: tabFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

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

/* ===== 响应式标签页 ===== */
@media (max-width: 640px) {
    .main-tab-nav {
        padding: 0 8px;
        height: 42px;
    }

    .main-tab-btn {
        font-size: 13px;
        padding: 0 14px;
        letter-spacing: 0.3px;
    }

    .main-tab-btn.active::after {
        left: 8px;
        right: 8px;
        height: 2.5px;
    }
}

@media (max-width: 380px) {
    .main-tab-btn {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* =============================================
   指数估值表作用域样式
   所有 index.html 的样式均限定在 .evaluation-panel 内
   ============================================= */

.evaluation-panel {
    --eval-bg-primary: #f0f2f5;
    --eval-bg-secondary: #ffffff;
    --eval-bg-card: #ffffff;
    --eval-text-primary: #1a1a2e;
    --eval-text-secondary: #4a5568;
    --eval-text-muted: #94a3b8;
    --eval-border-light: rgba(0, 0, 0, 0.06);
    --eval-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --eval-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --eval-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --eval-shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.06);
    --eval-green-start: #10b981;
    --eval-green-end: #34d399;
    --eval-green-bg: rgba(16, 185, 129, 0.08);
    --eval-green-border: rgba(16, 185, 129, 0.2);
    --eval-yellow-start: #f59e0b;
    --eval-yellow-end: #fbbf24;
    --eval-yellow-bg: rgba(245, 158, 11, 0.08);
    --eval-yellow-border: rgba(245, 158, 11, 0.2);
    --eval-red-start: #ef4444;
    --eval-red-end: #f87171;
    --eval-red-bg: rgba(239, 68, 68, 0.08);
    --eval-red-border: rgba(239, 68, 68, 0.2);
    --eval-blue-start: #3b82f6;
    --eval-blue-end: #60a5fa;
    --eval-radius-sm: 6px;
    --eval-radius-md: 12px;
    --eval-radius-lg: 16px;
    --eval-radius-full: 9999px;
    --eval-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --eval-transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --eval-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ecf1 50%, #f0f2f5 100%);
    color: var(--eval-text-primary);
    padding: 20px 16px;
    overflow-y: auto;
    flex: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.evaluation-panel .page-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.evaluation-panel .section {
    margin-bottom: 20px;
}

.evaluation-panel .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 8px;
    background: var(--eval-bg-card);
    border-radius: var(--eval-radius-md);
    box-shadow: var(--eval-shadow-sm);
    border-left: 4px solid var(--eval-blue-start);
    position: relative;
    overflow: hidden;
}

.evaluation-panel .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.evaluation-panel .section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--eval-text-primary);
    letter-spacing: 0.5px;
    position: relative;
}

.evaluation-panel .section-date {
    font-size: 12px;
    color: var(--eval-text-muted);
    margin-left: auto;
    background: rgba(59, 130, 246, 0.06);
    padding: 3px 10px;
    border-radius: var(--eval-radius-full);
    font-weight: 500;
    position: relative;
}

.evaluation-panel .card {
    background: var(--eval-bg-card);
    border-radius: var(--eval-radius-md);
    padding: 12px 16px;
    margin-bottom: 6px;
    box-shadow: var(--eval-shadow-md);
    border: 1px solid var(--eval-border-light);
    transition: transform var(--eval-transition-base), box-shadow var(--eval-transition-base);
    position: relative;
    overflow: hidden;
}

.evaluation-panel .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--eval-green-start), var(--eval-yellow-start), var(--eval-red-start));
    opacity: 0;
    transition: opacity var(--eval-transition-base);
}

.evaluation-panel .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--eval-shadow-hover);
}

.evaluation-panel .card:hover::before {
    opacity: 1;
}

.evaluation-panel .card-inner {
    display: flex;
    gap: 16px;
    align-items: center;
}

.evaluation-panel .card-main {
    flex: 1;
    min-width: 0;
}

.evaluation-panel .card-side {
    width: auto;
    min-width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-left: 1px solid var(--eval-border-light);
    padding-left: 16px;
}

.evaluation-panel .index-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.evaluation-panel .index-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--eval-blue-start);
    letter-spacing: 0.3px;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    transition: none;
}

.evaluation-panel .index-name:hover {
    color: var(--eval-blue-start);
}

.evaluation-panel .index-name:visited {
    color: var(--eval-blue-start);
}

.evaluation-panel .index-change-badge {
    width: 55px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--eval-radius-sm);
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    white-space: nowrap;
    transition: all var(--eval-transition-fast);
    letter-spacing: 0.3px;
    animation: evalBadgePopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes evalBadgePopIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.evaluation-panel .index-change-badge.up {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.evaluation-panel .index-change-badge.down {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.evaluation-panel .index-change-badge.flat {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.12);
}

.evaluation-panel .index-change-loader {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 3px;
}

.evaluation-panel .index-change-loader .dot {
    width: 3px;
    height: 3px;
    background: var(--eval-text-muted);
    border-radius: 50%;
    animation: evalDotPulse 1.2s ease-in-out infinite;
}

.evaluation-panel .index-change-loader .dot:nth-child(2) { animation-delay: 0.2s; }
.evaluation-panel .index-change-loader .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes evalDotPulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.7); }
    40% { opacity: 1; transform: scale(1); }
}

.evaluation-panel .index-code {
    font-size: 11px;
    color: var(--eval-text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: var(--eval-radius-full);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.evaluation-panel .index-roe {
    font-size: 11px;
    color: var(--eval-blue-start);
    background: rgba(59, 130, 246, 0.06);
    padding: 2px 8px;
    border-radius: var(--eval-radius-full);
    font-weight: 600;
}

.evaluation-panel .state-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--eval-radius-full);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.evaluation-panel .state-badge.green {
    color: var(--eval-green-start);
    background: var(--eval-green-bg);
    border: 1px solid var(--eval-green-border);
}

.evaluation-panel .state-badge.yellow {
    color: var(--eval-yellow-start);
    background: var(--eval-yellow-bg);
    border: 1px solid var(--eval-yellow-border);
}

.evaluation-panel .state-badge.red {
    color: var(--eval-red-start);
    background: var(--eval-red-bg);
    border: 1px solid var(--eval-red-border);
}

.evaluation-panel .progress-track {
    display: flex;
    gap: 2px;
    margin-bottom: 2px;
}

.evaluation-panel .progress-segment {
    position: relative;
    height: 18px;
    flex: 1;
    border-radius: 4px;
    overflow: hidden;
}

.evaluation-panel .progress-segment:first-child {
    border-radius: var(--eval-radius-md) 4px 4px var(--eval-radius-md);
}

.evaluation-panel .progress-segment:last-child {
    border-radius: 4px var(--eval-radius-md) var(--eval-radius-md) 4px;
}

.evaluation-panel .progress-bg {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.evaluation-panel .progress-bg.green {
    background: var(--eval-green-bg);
}

.evaluation-panel .progress-bg.yellow {
    background: var(--eval-yellow-bg);
}

.evaluation-panel .progress-bg.red {
    background: var(--eval-red-bg);
}

.evaluation-panel .progress-bg.neutral {
    background: rgba(0, 0, 0, 0.03);
}

.evaluation-panel .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    animation: evalFillIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes evalFillIn {
    from { width: 0 !important; }
}

.evaluation-panel .progress-fill.green {
    background: var(--eval-green-start);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
    border-radius: 0;
}

.evaluation-panel .progress-fill.yellow {
    background: var(--eval-yellow-start);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
    border-radius: 0;
}

.evaluation-panel .progress-fill.red {
    background: var(--eval-red-start);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
    border-radius: 0;
}

.evaluation-panel .progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--eval-text-primary);
    letter-spacing: 0.3px;
    z-index: 1;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.evaluation-panel .threshold-row {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    line-height: 1.2;
}

.evaluation-panel .threshold-item {
    font-size: 10px;
    color: var(--eval-text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.evaluation-panel .threshold-item:first-child {
    text-align: left;
    width: 16.66%;
}

.evaluation-panel .threshold-item:nth-child(2) {
    text-align: center;
    width: 33.33%;
}

.evaluation-panel .threshold-item:nth-child(3) {
    text-align: center;
    width: 33.33%;
}

.evaluation-panel .threshold-item:last-child {
    text-align: right;
    width: 16.66%;
}

.evaluation-panel .side-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.evaluation-panel .side-label {
    font-size: 11px;
    color: var(--eval-text-muted);
    min-width: 40px;
    font-weight: 500;
}

.evaluation-panel .side-value {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.evaluation-panel .side-value.green {
    color: var(--eval-green-start);
}

.evaluation-panel .side-value.red {
    color: var(--eval-red-start);
}

.evaluation-panel .side-value.muted {
    color: var(--eval-text-secondary);
}

.evaluation-panel .fund-codes {
    width: auto;
    min-width: 45%;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-bottom: 4px;
    margin-bottom: 2px;
}

.evaluation-panel .fund-tag {
    font-size: 11px;
    color: var(--eval-text-secondary);
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--eval-radius-sm);
    font-weight: 500;
}

.evaluation-panel .fund-tag span {
    font-weight: 700;
    color: var(--eval-text-primary);
}

.evaluation-panel .change-row {
    display: flex;
    width: auto;
    min-width: 45%;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}

.evaluation-panel .change-item {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 50%;
}

.evaluation-panel .change-label {
    font-size: 11px;
    color: var(--eval-text-muted);
    font-weight: 500;
}

.evaluation-panel .change-value {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.evaluation-panel .change-value.green {
    color: var(--eval-green-start);
}

.evaluation-panel .change-value.red {
    color: var(--eval-red-start);
}

.evaluation-panel .change-arrow {
    font-size: 10px;
    font-weight: 800;
}

.evaluation-panel .change-arrow.green {
    color: var(--eval-green-start);
}

.evaluation-panel .change-arrow.red {
    color: var(--eval-red-start);
}

.evaluation-panel .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 16px;
}

.evaluation-panel .loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--eval-border-light);
    border-top-color: var(--eval-blue-start);
    border-radius: 50%;
    animation: evalSpin 0.8s linear infinite;
}

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

.evaluation-panel .loading-text {
    font-size: 14px;
    color: var(--eval-text-muted);
    font-weight: 500;
}

.evaluation-panel .error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 12px;
    padding: 40px 20px;
}

.evaluation-panel .error-icon {
    font-size: 40px;
    color: var(--eval-red-start);
}

.evaluation-panel .error-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--eval-text-primary);
}

.evaluation-panel .error-message {
    font-size: 13px;
    color: var(--eval-text-muted);
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}

.evaluation-panel .error-retry-btn {
    margin-top: 8px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--eval-blue-start);
    border: none;
    border-radius: var(--eval-radius-full);
    cursor: pointer;
    transition: background var(--eval-transition-fast);
}

.evaluation-panel .error-retry-btn:hover {
    background: var(--eval-blue-end);
}

/* ===== 指数估值表响应式 ===== */
@media (max-width: 768px) {
    .evaluation-panel {
        padding: 6px 4px;
    }

    .evaluation-panel .section {
        margin-bottom: 10px;
    }

    .evaluation-panel .section-header {
        padding: 6px 10px;
        margin-bottom: 5px;
        gap: 6px;
    }

    .evaluation-panel .section-title {
        font-size: 13px;
    }

    .evaluation-panel .section-date {
        font-size: 11px;
        padding: 2px 8px;
    }

    .evaluation-panel .card-main {
        padding: 0 1px;
    }

    .evaluation-panel .card {
        margin-bottom: 3px;
    }

    .evaluation-panel .card:hover {
        transform: none;
        box-shadow: var(--eval-shadow-md);
    }

    .evaluation-panel .card:hover::before {
        opacity: 0;
    }

    .evaluation-panel .card-inner {
        flex-direction: column;
        gap: 3px;
        align-items: stretch;
        margin-bottom: 0;
    }

    .evaluation-panel .card-side {
        min-width: 0;
        flex-shrink: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3px;
        border-left: none;
        margin-bottom: 0;
        margin-top: 1px;
        padding-left: 0;
    }

    .evaluation-panel .index-header {
        gap: 4px;
        margin-bottom: 4px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .evaluation-panel .index-name {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1;
        min-width: 100px;
    }

    .evaluation-panel .index-code,
    .evaluation-panel .index-roe,
    .evaluation-panel .state-badge {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 10px;
        padding: 1px 6px;
    }

    .evaluation-panel .index-change-badge {
        font-size: 10px;
        padding: 1px 5px;
    }

    .evaluation-panel .index-change-loader .dot {
        width: 2px;
        height: 2px;
    }

    .evaluation-panel .fund-codes {
        gap: 3px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .evaluation-panel .fund-tag {
        font-size: 10px;
    }

    .evaluation-panel .change-row {
        flex-wrap: nowrap;
        gap: 6px;
        white-space: nowrap;
    }

    .evaluation-panel .change-label {
        font-size: 10px;
    }

    .evaluation-panel .change-value {
        font-size: 11px;
    }

    .evaluation-panel .change-arrow {
        font-size: 9px;
    }

    .evaluation-panel .change-label,
    .evaluation-panel .change-value,
    .evaluation-panel .change-arrow {
        white-space: nowrap;
    }

    .evaluation-panel .side-row {
        white-space: nowrap;
    }

    .evaluation-panel .side-label {
        font-size: 10px;
        min-width: 32px;
    }

    .evaluation-panel .side-value {
        font-size: 11px;
    }

    .evaluation-panel .threshold-item {
        font-size: 9px;
    }

    .evaluation-panel .progress-track {
        height: 16px;
    }

    .evaluation-panel .progress-segment {
        height: 16px;
    }

    .evaluation-panel .progress-label {
        font-size: 9px;
    }

    .evaluation-panel .loading-container {
        min-height: 120px;
        gap: 10px;
    }

    .evaluation-panel .loading-spinner {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }

    .evaluation-panel .loading-text {
        font-size: 12px;
    }

    .evaluation-panel .error-container {
        min-height: 120px;
        gap: 8px;
        padding: 20px 12px;
    }

    .evaluation-panel .error-icon {
        font-size: 32px;
    }

    .evaluation-panel .error-title {
        font-size: 14px;
    }

    .evaluation-panel .error-message {
        font-size: 12px;
        line-height: 1.4;
    }

    .evaluation-panel .error-retry-btn {
        margin-top: 4px;
        padding: 6px 18px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .evaluation-panel .section {
        margin-bottom: 8px;
    }

    .evaluation-panel .section-header {
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 5px 8px;
        margin-bottom: 4px;
    }

    .evaluation-panel .section-title {
        font-size: 13px;
    }

    .evaluation-panel .section-date {
        margin-left: auto;
        font-size: 11px;
        padding: 1px 5px;
    }

    .evaluation-panel .card-inner {
        flex-direction: column;
        gap: 3px;
        align-items: stretch;
    }

    .evaluation-panel .card-side {
        min-width: 0;
        flex-shrink: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3px;
        border-left: none;
        margin-top: 1px;
        padding-left: 2px;
    }

    .evaluation-panel .card-main {
        padding: 0 5px;
    }

    .evaluation-panel .card {
        padding: 5px 10px;
    }

    .evaluation-panel .card:hover {
        transform: none;
        box-shadow: var(--eval-shadow-md);
    }

    .evaluation-panel .card:hover::before {
        opacity: 0;
    }

    .evaluation-panel .index-header {
        gap: 3px;
        margin-bottom: 3px;
    }

    .evaluation-panel .index-name {
        font-size: 12px;
        min-width: 100px;
    }

    .evaluation-panel .index-code,
    .evaluation-panel .index-roe {
        font-size: 10px;
        padding: 1px 4px;
    }

    .evaluation-panel .index-change-badge {
        width: 40px;
        font-size: 9px;
        padding: 0px 4px;
    }

    .evaluation-panel .index-change-loader .dot {
        width: 2px;
        height: 2px;
    }

    .evaluation-panel .state-badge {
        font-size: 10px;
        padding: 1px 4px;
    }

    .evaluation-panel .fund-codes {
        width: auto;
        min-width: 45%;
        gap: 2px;
        padding-bottom: 1px;
        margin-bottom: 0;
    }

    .evaluation-panel .fund-tag {
        font-size: 10px;
        padding: 0 3px;
    }

    .evaluation-panel .change-row {
        gap: 4px;
    }

    .evaluation-panel .change-label {
        font-size: 10px;
    }

    .evaluation-panel .change-value {
        font-size: 11px;
    }

    .evaluation-panel .change-arrow {
        font-size: 9px;
    }

    .evaluation-panel .side-label {
        font-size: 10px;
        min-width: 24px;
    }

    .evaluation-panel .side-value {
        font-size: 11px;
    }

    .evaluation-panel .threshold-item {
        font-size: 9px;
    }

    .evaluation-panel .progress-segment {
        height: 12px;
    }

    .evaluation-panel .progress-segment:nth-child(2) {
        border-radius: 2px;
    }

    .evaluation-panel .progress-label {
        font-size: 9px;
    }
}

/* =============================================
   登录认证覆盖层
   ============================================= */

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-800) 100%);
    opacity: 1;
    transition: opacity 0.4s ease;
}

.auth-overlay.auth-hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 16px;
    padding: 40px 36px 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--navy-900);
    box-shadow: 0 4px 16px rgba(201, 169, 110, 0.3);
}

.auth-logo-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-300);
    letter-spacing: -0.3px;
}

.auth-logo-subtitle {
    font-size: 13px;
    color: var(--slate-400);
    margin-top: 4px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-300);
    letter-spacing: 0.2px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--slate-50);
    font-size: 14px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: var(--slate-500);
}

.auth-input:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.auth-input.auth-input-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.auth-toggle-pwd {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-400);
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    font-size: 16px;
}

.auth-toggle-pwd:hover {
    color: var(--gold-400);
    background: rgba(255, 255, 255, 0.06);
}

.auth-toggle-pwd:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
}

.auth-error-msg {
    font-size: 12px;
    color: #e74c3c;
    min-height: 16px;
    line-height: 16px;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--slate-400);
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-500);
    cursor: pointer;
    margin: 0;
}

.auth-forgot {
    font-size: 13px;
    color: var(--gold-400);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot:hover {
    color: var(--gold-300);
    text-decoration: underline;
}

.auth-forgot:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 2px;
}

.auth-submit {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border: none;
    border-radius: 10px;
    color: var(--navy-900);
    font-size: 15px;
    font-weight: 700;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    letter-spacing: 0.3px;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(201, 169, 110, 0.35);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 2px solid var(--gold-300);
    outline-offset: 2px;
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-footer-text {
    font-size: 13px;
    color: var(--slate-500);
}

.auth-footer-link {
    color: var(--gold-400);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-footer-link:hover {
    color: var(--gold-300);
    text-decoration: underline;
}

.auth-footer-link:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 2px;
}

.auth-lockout-msg {
    text-align: center;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: #e74c3c;
    line-height: 1.5;
}

.auth-csrf-input {
    display: none;
}

.auth-logout-btn {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--slate-400);
    font-size: 13px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.auth-logout-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.25);
}

.auth-logout-btn:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 24px;
        margin: 12px;
    }

    .auth-logo-title {
        font-size: 18px;
    }

    .auth-input {
        height: 42px;
    }

    .auth-submit {
        height: 42px;
    }
}
