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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ── 顶部导航栏 ── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid #333;
    margin-bottom: 0;
}

.top-bar h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.top-bar nav {
    display: flex;
    gap: 4px;
}

.top-bar nav button {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.top-bar nav button:hover {
    background: #f0f0f0;
}

.top-bar nav button.active {
    background: #333;
    color: white;
    border-color: #333;
}

/* ── 导航下拉菜单 ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > button {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.nav-dropdown > button:hover {
    background: #f0f0f0;
}

.nav-dropdown > button.active {
    background: #333;
    color: white;
    border-color: #333;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    border: none;
    background: white;
    color: #555;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}

.dropdown-menu button:hover {
    background: #f5f5f5;
}

.dropdown-menu button.active {
    background: #333;
    color: white;
}

/* ── 页面头部（行业选择） ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls select,
.controls input[type="date"] {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
}

.controls select {
    min-width: 240px;
}

.controls button.query-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: #333;
    color: white;
    cursor: pointer;
    transition: background 0.15s;
}

.controls button.query-btn:hover {
    background: #555;
}

.controls button.query-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* ── 加载 / 占位 ── */
.loading, .placeholder {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 16px;
}

/* ── MA 变动卡片 ── */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card .label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

.card .value {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.card.up .value {
    color: #e74c3c;
}

.card.down .value {
    color: #2ecc71;
}

.card.custom-ma-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.card.custom-ma-card input[type="number"] {
    width: 72px;
    padding: 3px 6px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.card.custom-ma-card input[type="number"]:focus {
    border-color: #3498db;
}

.card.custom-ma-card .value {
    font-size: 16px;
}

/* ── 图表容器 ── */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 500px;
}

.chart-container.tall {
    height: 600px;
}

/* ── 数据表格 ── */
.data-table-wrapper {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 20px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
    position: sticky;
    top: 0;
}

.data-table td:first-child,
.data-table th:first-child {
    text-align: left;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table .up {
    color: #e74c3c;
}

.data-table .down {
    color: #2ecc71;
}

/* ── 分页控件 ── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #f0f0f0;
}

.pagination button {
    padding: 6px 16px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
}

.pagination button:hover:not(:disabled) {
    background: #f0f0f0;
}

.pagination button:disabled {
    color: #bbb;
    cursor: not-allowed;
}

/* ── 行业筛选页面 ── */
.screening-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.warnings {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #856404;
}

.warning-item + .warning-item {
    margin-top: 4px;
}

.trend-row {
    background: #fff5f5 !important;
    font-weight: 600;
}

.trend-row td:first-child {
    border-left: 3px solid #e74c3c;
}

.excluded-row {
    opacity: 0.55;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.trend-badge {
    background: #e74c3c;
    color: white;
}

.qualified-badge {
    background: #d4edda;
    color: #155724;
}

.excluded-badge {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* ── 回测模拟页面 ── */

.strategy-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.strategy-header:hover {
    background: #f5f5f5;
}

.strategy-toggle {
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
}

.param-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.param-item label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    min-width: 80px;
}

.param-item input {
    width: 100px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: right;
}

.param-item .unit {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* ── 时间模式切换 ── */
.time-mode-toggle {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.time-mode-toggle button {
    padding: 5px 14px;
    font-size: 13px;
    border: none;
    background: white;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.time-mode-toggle button:hover {
    background: #f0f0f0;
}

.time-mode-toggle button.active {
    background: #333;
    color: white;
}

.param-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.reset-btn {
    padding: 6px 16px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    color: #555;
    cursor: pointer;
}

.reset-btn:hover {
    background: #f0f0f0;
}

/* ── LLT20 权重输入 ── */
.llt20-weights {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.llt20-weights input {
    width: 60px;
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.weight-label {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

/* ── LLT20 仓位说明 ── */
.llt20-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

/* ── 金叉死叉策略信息面板 ── */
.gc-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

/* ── 信号徽章 ── */
.golden-badge {
    background: #ffd700;
    color: #333;
}

.death-badge {
    background: #333;
    color: white;
}

.hold-badge {
    background: #d4edda;
    color: #155724;
}

/* ── 金叉死叉持仓详情行 ── */
.gc-holding-row td {
    padding: 0 16px 12px 16px;
    background: #fafbfc;
}

.gc-holding-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
}

.gc-holding-table th,
.gc-holding-table td {
    padding: 6px 12px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
}

.gc-holding-table th {
    background: transparent;
    font-weight: 500;
    color: #888;
    position: static;
}

.gc-holding-table td:first-child,
.gc-holding-table th:first-child {
    text-align: left;
}

.gc-bar-bg {
    width: 100%;
    height: 14px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.gc-bar-fill {
    height: 100%;
    background: #333;
    border-radius: 3px;
    min-width: 2px;
}

.backtest-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.backtest-chart {
    height: 700px;
}

.backtest-table td {
    font-size: 13px;
}

.link-btn {
    padding: 3px 10px;
    font-size: 12px;
    border: 1px solid #3498db;
    border-radius: 4px;
    background: white;
    color: #3498db;
    cursor: pointer;
}

.link-btn:hover {
    background: #3498db;
    color: white;
}

/* ── 优化结果排名表行高亮 ── */
.data-table tr.selected-row {
    background: #e8f4fd;
}

.data-table tr.selected-row:hover {
    background: #d5eaf8 !important;
}

/* ── 优化排名表点击行 ── */
.data-table tr.clickable-row {
    cursor: pointer;
}

/* ── 止损徽章 ── */
.stop-loss-badge {
    background: #ff6b6b;
    color: white;
}

/* ── 进度条 ── */
.progress-section {
    padding: 30px 20px;
    text-align: center;
}

.progress-bar-bg {
    width: 100%;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: #333;
    border-radius: 10px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.stop-btn {
    padding: 6px 16px;
    font-size: 13px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.stop-btn:hover {
    background: #c0392b;
}

/* ── CSV 导出/导入按钮 ── */
.btn-export {
    background: #27ae60 !important;
}
.btn-export:hover:not(:disabled) {
    background: #219a52 !important;
}
.btn-import {
    background: #2980b9 !important;
}
.btn-import:hover:not(:disabled) {
    background: #2472a4 !important;
}

/* ── 导入错误提示 ── */
.import-error {
    background: #fdf0f0;
    color: #c0392b;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #e8c4c4;
    margin: 8px 0 0;
    font-size: 14px;
}

/* ── 个股收集页面 ── */
.search-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 260px;
}
.concept-tag {
    display: inline-block;
    background: #eef4fb;
    color: #2c6faa;
    border: 1px solid #cfe2f3;
    border-radius: 10px;
    padding: 1px 8px;
    margin: 1px 3px 1px 0;
    font-size: 12px;
    white-space: nowrap;
}
.muted {
    color: #aaa;
}
.collect-table td:nth-child(5) {
    max-width: 420px;
}

/* ── ETF 数据拉取提示 ── */
.etf-fetching-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 10000;
    background: linear-gradient(90deg, #2980b9, #3498db);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.etf-fetching-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: etf-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes etf-spin {
    to { transform: rotate(360deg); }
}

/* ── ETF 管理页面 ── */
.etf-builder-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-top: 16px;
}

.etf-list-panel {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 12px;
    max-height: 600px;
    overflow-y: auto;
}

.etf-list-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
    margin-bottom: 4px;
}

.etf-list-item:hover {
    background: #f5f5f5;
}

.etf-list-item.active {
    background: #e8f4fd;
    border-left: 3px solid #3498db;
}

.etf-list-name {
    font-weight: 600;
    font-size: 14px;
}

.etf-list-count {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.etf-list-empty {
    text-align: center;
    color: #aaa;
    padding: 30px 10px;
    font-size: 14px;
    line-height: 1.8;
}

.etf-list-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.etf-list-actions button {
    width: 100%;
}

.etf-editor-panel {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 16px;
}

.etf-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.etf-name-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.etf-editor-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.etf-weight-input {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
}

.etf-search-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.etf-search-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.etf-search-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.etf-search-results {
    margin-top: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.etf-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.etf-search-code {
    font-family: monospace;
    font-size: 13px;
    color: #555;
    min-width: 90px;
}

.etf-search-name {
    flex: 1;
    font-size: 14px;
}

/* ── ETF 复选框组 ── */
.etf-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.etf-check-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 10px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
    transition: all 0.1s;
}

.etf-check-item:hover {
    background: #f0f0f0;
}

.etf-check-item input[type="checkbox"] {
    margin: 0;
}

/* ── ETF 导入按钮（与导出按钮同尺寸） ── */
.etf-import-label {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: #2980b9;
    color: white;
    cursor: pointer;
    transition: background 0.15s;
}

.etf-import-label:hover {
    background: #2472a4;
}

/* ── ETF 保存按钮（蓝色） ── */
.btn-save {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: #2980b9;
    color: white;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-save:hover {
    background: #2472a4;
}

/* ══════════════════════════════════════ */
/*  实盘综合模拟页面                        */
/* ══════════════════════════════════════ */

.live-sim-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: start;
}

.live-sim-sidebar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
}

.live-sim-card {
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.live-sim-card:hover {
    border-color: #3498db;
}

.live-sim-card.active {
    border-color: #3498db;
    background: #ebf5fb;
}

.live-sim-card-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.live-sim-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.tag-on {
    color: #2ecc71;
    font-weight: 500;
}

.tag-off {
    color: #e74c3c;
    font-weight: 500;
}

.live-sim-main {
    min-width: 0;
}

/* 资金占比可视化条 */
.ratio-bar-container {
    margin-top: 8px;
}

.ratio-bar {
    display: flex;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #eee;
}

.ratio-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    transition: width 0.2s;
    min-width: 2px;
}

.ratio-summary {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.ratio-summary b {
    font-weight: 600;
}

/* 通用按钮 */
.btn-primary {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: #3498db;
    color: white;
    cursor: pointer;
    transition: background 0.15s;
    margin-right: 8px;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    text-decoration: underline;
}

.btn-link:hover {
    color: #2980b9;
}

.btn-link-danger {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    text-decoration: underline;
}

.btn-link-danger:hover {
    color: #c0392b;
}

.error-banner {
    padding: 8px 16px;
    margin-bottom: 12px;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #c0392b;
    font-size: 13px;
}

.loading-text,
.empty-text {
    color: #999;
    font-size: 13px;
    padding: 12px 0;
}

.params-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #888;
}

.param-unit {
    color: #999;
    font-size: 11px;
    margin-left: 2px;
}

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

/* ══════════════════════════════════════ */
/*  策略折叠式详细说明                      */
/* ══════════════════════════════════════ */

.strategy-desc {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}

.strategy-desc-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #3498db;
    text-align: left;
    transition: background 0.15s;
}

.strategy-desc-toggle:hover {
    background: #f0f0f0;
}

.strategy-desc-toggle .toggle-icon {
    font-size: 10px;
    transition: transform 0.15s;
}

.strategy-desc-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

.strategy-desc-body {
    padding: 4px 16px 14px;
    border-top: 1px solid #eee;
}

.desc-section {
    margin-top: 12px;
}

.desc-section h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding-left: 8px;
    border-left: 3px solid #3498db;
}

.desc-section p {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.desc-section ul {
    margin: 4px 0;
    padding-left: 24px;
}

.desc-section li {
    font-size: 13px;
    line-height: 1.7;
    color: #555;
}

.desc-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 12px;
}

.desc-section table th,
.desc-section table td {
    border: 1px solid #eee;
    padding: 5px 8px;
    text-align: left;
}

.desc-section table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.desc-note {
    color: #e67e22;
    font-size: 12px;
    font-style: italic;
}

/* ══════════════════════════════════════ */
/*  实盘综合模拟子标签页                    */
/* ══════════════════════════════════════ */

.sub-tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #eee;
    padding-bottom: 0;
}

.sub-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: none;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.sub-tab:hover {
    color: #3498db;
}

.sub-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* 批量分析复用单因子页的页头、参数卡片、按钮和表格，仅补充布局。 */
.factor-analysis-tabs { margin-bottom: 4px; }
.factor-analysis-page .page-header { flex-wrap: wrap; gap: 12px; }
.factor-analysis-page .page-header h2 { flex-shrink: 0; }
.factor-analysis-page .controls { flex-wrap: wrap; max-width: 100%; }
.factor-batch-panel { min-width: 0; }
.factor-holding-panel { padding: 20px; margin: 20px 0; min-width: 0; }
.factor-holding-panel p { margin: 12px 0; line-height: 1.7; font-size: 13px; overflow-wrap: anywhere; }
.factor-holding-panel .controls { flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.factor-holding-panel .chart-container { margin: 14px 0; }
.factor-holding-panel details { margin: 14px 0; }
.factor-holding-panel summary { cursor: pointer; }
.factor-holding-panel .data-table-wrapper { overflow-x: auto; }
.factor-holding-panel .data-table { min-width: 560px; }
.factor-holding-panel textarea { padding: 8px; margin-top: 8px; }
.factor-holding-panel button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 520px) { .factor-holding-panel { padding: 12px; } }
.factor-batch-panel .page-header,
.factor-batch-panel .controls { flex-wrap: wrap; gap: 10px; }
.factor-batch-panel p { margin: 10px 0; line-height: 1.6; font-size: 13px; }
.factor-batch-panel summary { cursor: pointer; }
.factor-batch-panel summary.strategy-header { list-style: none; }
.factor-batch-panel summary.strategy-header::-webkit-details-marker { display: none; }
.factor-batch-panel details[open] > summary .batch-when-closed,
.factor-batch-panel details:not([open]) > summary .batch-when-open { display: none; }
.factor-batch-panel input[type="checkbox"] { width: auto; accent-color: #333; }
.factor-batch-panel button:disabled { opacity: .5; cursor: not-allowed; }
.batch-body { padding: 16px; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.batch-hint { font-size: 13px; color: #888; }
.batch-factor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.batch-factor { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.batch-factor label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; white-space: normal; line-height: 1.5; cursor: pointer; }
.batch-factor input[type="number"] { width: 70px; flex-shrink: 0; }
.batch-quality { border-top: 1px solid #eee; padding-top: 12px; }
.batch-error { color: #c0392b; }
.batch-warning { color: #e67e22; }
.batch-history { padding: 16px 0; border-bottom: 1px solid #ddd; }
.batch-history label { display: flex; align-items: center; gap: 10px; color: #555; font-size: 13px; min-width: 0; }
.batch-history select { max-width: 100%; min-width: 0; }
.batch-result-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0 16px; }
.batch-result-heading h3 { font-size: 16px; font-weight: 600; }
.batch-audit { margin: 16px 0; font-size: 13px; color: #666; }
.batch-audit summary { color: #3498db; }
.batch-json { margin-top: 12px; padding: 12px; border: 1px solid #eee; background: #fafafa; border-radius: 4px; max-height: 360px; overflow: auto; white-space: pre-wrap; font-size: 12px; }
.batch-table-scroll { overflow-x: auto; }
.batch-table { min-width: 1600px; }
.batch-table td:first-child { white-space: normal; min-width: 220px; }
.batch-chart { height: 360px; width: 100%; margin: 16px 0; }
.batch-detail { margin-top: 20px; }
@media (max-width: 800px) {
    .factor-batch-panel .param-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .batch-factor-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .factor-batch-panel .param-grid { grid-template-columns: minmax(0, 1fr); }
    .factor-batch-panel .controls select { min-width: 0; max-width: 100%; }
    .batch-history label { width: 100%; }
    .batch-history select { flex: 1; width: 0; }
}
[v-cloak], [hidden] { display: none !important; }
.team-login { max-width: 440px; margin: 10vh auto; padding: 32px; }
.team-login label { display: block; margin: 18px 0; }
.team-login input { display: block; width: 100%; margin-top: 8px; box-sizing: border-box; }
.team-controls, .team-form { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 16px 0; }
.team-form label { display: flex; flex-direction: column; gap: 6px; }
.team-workspace details { margin: 16px 0; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; }
.team-workspace summary { cursor: pointer; font-weight: 600; }
.top-bar { flex-wrap: wrap; gap: 14px; }
.top-bar nav { flex: 1 1 100%; flex-wrap: wrap; gap: 6px; }
.top-bar nav button { white-space: nowrap; padding: 8px 12px; }
.team-identity { color: #777; font-size: 13px; overflow-wrap: anywhere; }
.team-workspace, .team-account, .team-login { font-size: 14px; line-height: 1.65; }
.team-workspace .strategy-card, .team-account { padding: 22px; margin-top: 20px; }
.team-workspace h2, .team-account h2 { font-size: 20px; margin-bottom: 10px; }
.team-workspace h3 { font-size: 17px; margin-bottom: 8px; }
.team-workspace p, .team-account p { margin: 8px 0; }
.team-workspace input, .team-workspace select, .team-account input:not([type="checkbox"]),
.team-account select, .team-login input { padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: white; max-width: 100%; }
.team-workspace .query-btn, .team-account .query-btn, .team-login .query-btn {
    padding: 9px 16px; border: 0; border-radius: 6px; background: #333; color: white; font: inherit; cursor: pointer;
}
.team-workspace button:disabled, .team-account button:disabled, .team-login button:disabled { opacity: .5; cursor: not-allowed; }
.team-form label { flex: 1 1 180px; min-width: 0; }
.team-workspace .data-table { min-width: 460px; }
@media (max-width: 600px) {
    .team-workspace .strategy-card, .team-account { padding: 16px; }
    .team-login { margin: 8vh 16px; padding: 24px; }
    .team-controls { align-items: stretch; }
    .team-controls label, .team-form label { flex-basis: 100%; }
    .team-controls select { width: 100%; }
    .nav-dropdown .dropdown-menu { right: auto; left: 0; }
}
