/* ===== 面板样式模块 ===== */

/* 顶部工具栏 */
.toolbar {
    height: 44px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    position: relative;
    z-index: 50;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toolbar h1 {
    font-size: 15px;
    font-weight: 500;
    color: var(--accent-blue);
    letter-spacing: -0.025em;
}

.toolbar h1 i {
    margin-right: 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.connection-status.connected {
    color: var(--accent-green);
}

.connection-status.disconnected {
    color: var(--accent-red);
}

.connection-status i {
    font-size: 12px;
}

.current-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price .price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.current-price .change {
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 2px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.current-price .change.positive {
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.15);
}

.current-price .change.negative {
    color: var(--accent-red);
    background: rgba(255, 82, 82, 0.15);
}

/* 策略中心菜单 */
.strategy-bar {
    height: 44px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 12px;
    color: var(--text-secondary);
    position: relative;
    z-index: 50;
}

.strategy-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.strategy-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.strategy-bar .menu-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.strategy-bar .menu-item i {
    color: var(--accent-blue);
}

#strategy-params-container {
    display: flex;
    gap: 15px;
}

/* 顶部策略中心的参数样式 */
#strategy-params-container .strategy-params {
    display: none;
    gap: 15px;
    align-items: center;
}

#strategy-params-container .strategy-params.active {
    display: flex;
}

/* 量化策略组合面板 - 使用精确定位避免与底部面板重叠 */
.platform-value-panel {
    position: fixed !important;
    top: 88px !important; /* 工具栏44px + 策略栏44px */
    left: 0;
    bottom: 351px !important; /* 为底部面板留出精确空间：350px高度 + 1px边框 */
    width: 380px; /* 增加宽度以容纳更多专业数据 */
    min-width: 380px;
    background: var(--bg-secondary) !important;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-primary);
    overflow: hidden;
    z-index: 40; /* 确保在底部面板之上，但不覆盖 */
}

/* 面板头部切换选项卡 */
.panel-header {
    flex: 0 0 auto;
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-primary);
    padding: 2px;
    position: relative;
    z-index: 10;
}

.panel-title {
    color: var(--accent-blue);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i {
    font-size: 16px;
}

.panel-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.panel-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.panel-tab:hover {
    background: rgba(42, 130, 228, 0.1);
    color: var(--accent-blue);
}

.panel-tab.active {
    background: linear-gradient(135deg, var(--accent-blue), #1976d2);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(42, 130, 228, 0.3);
}

.panel-tab i {
    font-size: 12px;
}

/* 面板视图容器 - 确保高度计算正确 */
.panel-views {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    height: calc(100vh - 139px); /* 精确计算：视口高度 - 顶部88px - 面板头部51px */
}

.panel-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    overflow: hidden; /* 默认去掉滚动条 */
    animation: fadeIn 0.3s ease-in-out;
}

.panel-view.active {
    display: flex;
    overflow-y: auto; /* 给激活的面板视图添加滚动条 */
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) var(--bg-tertiary);
    max-height: calc(100vh - 139px); /* 确保不超出容器高度 */
}

/* panel-view.active 滚动条样式 */
.panel-view.active::-webkit-scrollbar {
    width: 14px;
    background: var(--bg-tertiary);
}

.panel-view.active::-webkit-scrollbar-track {
    background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-primary));
    border-radius: 7px;
    margin: 4px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.panel-view.active::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-blue), #1976d2);
    border-radius: 7px;
    border: 2px solid var(--bg-tertiary);
    min-height: 30px;
    box-shadow: 0 2px 6px rgba(42, 130, 228, 0.3);
}

.panel-view.active::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1976d2, #1565c0);
    box-shadow: 0 3px 8px rgba(42, 130, 228, 0.5);
}

/* panel-view.platform-view.active 专用滚动条样式 */
.panel-view.platform-view.active {
    scrollbar-width: thin;
    scrollbar-color: #787B86 var(--bg-tertiary);
}

.panel-view.platform-view.active::-webkit-scrollbar {
    width: 16px;
    background: var(--bg-tertiary);
}

.panel-view.platform-view.active::-webkit-scrollbar-track {
    background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-primary));
    border-radius: 8px;
    margin: 4px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.panel-view.platform-view.active::-webkit-scrollbar-thumb {
    background: #787B86;
    border-radius: 8px;
    border: 2px solid var(--bg-tertiary);
    min-height: 40px;
    box-shadow: 0 2px 8px rgba(120, 123, 134, 0.4);
}

.panel-view.platform-view.active::-webkit-scrollbar-thumb:hover {
    background: #6A6D76;
    box-shadow: 0 3px 10px rgba(120, 123, 134, 0.6);
}

.panel-view.platform-view.active::-webkit-scrollbar-thumb:active {
    background: #5A5D66;
}

/* 平台核心指标部分 */
.platform-performance-section {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--border-primary);
}

.platform-metrics {
    padding: 12px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.metric-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
}

.metric-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.metric-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.metric-icon {
    color: var(--accent-blue);
    font-size: 12px;
    opacity: 0.7;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    margin-bottom: 3px;
}

.metric-value.profit {
    color: var(--accent-green);
}

.metric-value.loss {
    color: var(--accent-red);
}

.metric-sublabel {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.overview-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--accent-blue);
    font-size: 16px;
}

.overview-icon.profit {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
}

.overview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.overview-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.overview-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.overview-sublabel {
    font-size: 10px;
    color: var(--text-muted);
}

/* 策略组合选择部分 */
.strategy-portfolio-section {
    flex: 1 1 auto;
    border-bottom: 1px solid var(--border-primary);
    overflow: hidden;
}

.portfolio-container {
    height: 100%;
    overflow-y: auto;
    padding: 8px;
}

.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.portfolio-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(42, 130, 228, 0.15);
}

.portfolio-card.recommended {
    border-color: var(--accent-green);
    background: rgba(0, 230, 118, 0.03);
}

.portfolio-card.active {
    border-color: var(--accent-blue);
    background: rgba(42, 130, 228, 0.05);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.portfolio-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portfolio-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.portfolio-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: fit-content;
}

.portfolio-tag.recommended {
    background: rgba(255, 193, 7, 0.15);
    color: #ffb627;
}

.portfolio-tag.active {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
}

.portfolio-metrics {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-end;
}

.metric-item {
    font-size: 8px;
    padding: 2px 5px;
    background: rgba(42, 130, 228, 0.1);
    color: var(--accent-blue);
    border-radius: 2px;
    border: 1px solid rgba(42, 130, 228, 0.2);
    font-family: var(--font-mono);
    font-weight: 500;
}

.portfolio-risk {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portfolio-risk.low {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
}

.portfolio-risk.medium {
    background: rgba(255, 193, 7, 0.15);
    color: #ffb627;
}

.portfolio-risk.high {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.portfolio-risk.extreme {
    background: rgba(255, 82, 82, 0.15);
    color: var(--accent-red);
}

.portfolio-body {
    margin-bottom: 10px;
}

.portfolio-returns {
    margin-bottom: 8px;
}

.return-range {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-green);
    font-family: var(--font-mono);
    display: block;
}

.return-label {
    font-size: 10px;
    color: var(--text-muted);
}

.portfolio-composition {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.15);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border-primary);
    margin-bottom: 8px;
}

.composition-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}

/* 通用策略和信息样式 */
.strategy-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.strategy-weight {
    color: var(--accent-blue);
    font-weight: 600;
    font-family: var(--font-mono);
}

.portfolio-info {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.portfolio-actions {
    display: flex;
    gap: 6px;
}

.btn-portfolio-detail,
.btn-portfolio-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-portfolio-detail:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-portfolio-select.primary {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.btn-portfolio-select.primary:hover {
    background: #00b347;
}

.btn-portfolio-select.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    cursor: default;
}

/* 持仓风险分析部分 */
.position-analysis-section {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--border-primary);
}

.position-status {
    padding: 12px;
}

.position-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.position-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.position-metric:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.position-metric .metric-value.profit {
    color: var(--accent-green);
}

.risk-controls {
    display: flex;
    gap: 6px;
}

.btn-risk-action {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.btn-risk-action.primary {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.btn-risk-action.primary:hover {
    background: #1976d2;
    border-color: #1976d2;
}

.btn-risk-action.secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--bg-quaternary);
}

.btn-risk-action.warning {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-risk-action.warning:hover {
    background: rgba(255, 82, 82, 0.1);
}

/* 个人策略状态部分 */
.personal-strategy-section {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--border-primary);
}

.personal-status {
    padding: 12px;
}

.status-overview {
    margin-bottom: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-primary);
}

.status-item:last-child {
    border-bottom: none;
}

/* 状态样式在个人执行状态部分统一定义 */

.strategy-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-strategy-action {
    padding: 8px 12px;
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.btn-strategy-action:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-strategy-action.secondary:hover {
    background: var(--bg-quaternary);
}

.btn-strategy-action.warning {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-strategy-action.warning:hover {
    background: rgba(255, 82, 82, 0.1);
}

/* 模态框样式 */
.portfolio-details-modal,
.strategy-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: modalFadeIn 0.3s ease forwards;
}


.details-modal-content,
.selection-modal-content {
    background: var(--bg-secondary);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    animation: modalZoomIn 0.3s ease forwards;
}


.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-header h3 i {
    margin-right: 8px;
    color: var(--accent-blue);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.close-modal:hover {
    background: var(--bg-quaternary);
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.5;
}

.modal-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--border-primary);
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    background: var(--bg-tertiary);
    min-height: 60px;
    align-items: center;
}

/* 详情模态框特定样式 */
.detail-section {
    margin-bottom: 20px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detail-item,
.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    transition: all 0.15s ease;
}

.detail-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

/* 通用标签和数值样式 */
.detail-label,
.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value,
.metric-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.strategy-composition {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.strategy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    transition: all 0.15s ease;
}

.strategy-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.performance-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* 策略选择模态框样式 */
.portfolio-selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.selection-item:hover {
    border-color: var(--accent-blue);
    background: var(--bg-tertiary);
}

.selection-item.current {
    border-color: var(--accent-green);
    background: rgba(0, 230, 118, 0.05);
}

.selection-info {
    flex: 1;
}

.selection-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.selection-details {
    font-size: 11px;
    color: var(--text-muted);
}

.selection-action {
    flex: 0 0 auto;
}

.current-badge {
    font-size: 10px;
    padding: 4px 8px;
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-select-portfolio {
    padding: 6px 12px;
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    background: var(--accent-blue);
    color: white;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-select-portfolio:hover {
    background: #1976d2;
    border-color: #1976d2;
}

/* 通用按钮样式 */
.btn-secondary,
.btn-primary {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-secondary);
}

.btn-secondary:hover {
    background: var(--bg-quaternary);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(42, 130, 228, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #1976d2);
    color: white;
    border-color: var(--accent-blue);
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 130, 228, 0.3);
}

.btn-secondary:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .details-modal-content,
    .selection-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .detail-grid,
    .performance-metrics {
        grid-template-columns: 1fr;
    }
    
    .platform-value-panel {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
    }
    
    .main-layout {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 浏览器高度响应式控制 - 防止重叠 */
@media (max-height: 800px) {
    .strategy-performance-section {
        max-height: calc(100vh - 439px - 60px); /* 小屏幕精确计算 */
    }
    
    .strategy-performance-section .performance-container {
        max-height: calc(100vh - 499px); /* 小屏幕performance-container限制 */
    }
    
    .strategy-performance-section .performance-list {
        max-height: calc(100vh - 539px); /* 小屏幕performance-list限制 */
    }
    
    .strategy-selection-section {
        bottom: 200px !important; /* 小屏幕上为personal-execution-section留出200px */
    }
    
    .personal-execution-section {
        height: 200px !important;
    }
}

@media (max-height: 600px) {
    .strategy-performance-section {
        max-height: calc(100vh - 439px - 80px); /* 极小屏幕精确计算 */
        min-height: 120px; /* 降低最小高度 */
    }
    
    .strategy-performance-section .performance-container {
        max-height: calc(100vh - 519px); /* 极小屏幕performance-container限制 */
    }
    
    .strategy-performance-section .performance-list {
        max-height: calc(100vh - 559px); /* 极小屏幕performance-list限制 */
    }
    
    .strategy-selection-section {
        bottom: 180px !important; /* 极小屏幕上为personal-execution-section留出180px */
    }
    
    .personal-execution-section {
        height: 180px !important;
    }
}

/* 交易面板中的策略参数样式 */
.strategy-config-section .strategy-params {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.strategy-config-section .strategy-params.active {
    display: flex !important;
    flex-direction: column;
    gap: 15px;
}

.strategy-params .menu-item {
    gap: 4px;
}

.strategy-params input[type="number"] {
    width: 60px;
    -moz-appearance: textfield;
}

.strategy-params input::-webkit-outer-spin-button,
.strategy-params input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.strategy-bar select, .strategy-bar input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.strategy-bar input {
    width: 80px;
}

.strategy-bar input[type="date"] {
    width: 130px;
}

.strategy-bar span {
    font-size: 11px;
    color: var(--text-muted);
}

/* 主布局 - 精确计算避免与底部面板重叠 */
.main-layout {
    position: fixed !important;
    top: 88px !important; /* 顶部工具栏 + 策略栏 */
    left: 380px !important; /* 为左侧面板让出空间 */
    right: 300px !important; /* 为右侧面板让出空间 */
    bottom: 351px !important; /* 为底部面板让出空间：350px + 1px边框 */
    display: flex;
    overflow: hidden;
    background: var(--bg-primary);
    z-index: 10; /* 确保在面板之下 */
}

/* 确保在小屏幕上图表仍然可见 */
@media (max-height: 900px) {
    .main-layout {
        min-height: 350px;
        height: calc(100vh - 88px - 350px);
    }
}

.bottom-panel {
    margin-right: 0 !important;
    position: relative;
    z-index: 50;
}

/* 图表部分 */
.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-primary);
    height: 100%;
    overflow: hidden;
}

/* 价格信息条 */
.price-bar {
    height: 36px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

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

.symbol-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.last-price {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-green);
    font-family: var(--font-mono);
}

.price-change {
    font-size: 13px;
    color: var(--accent-green);
    font-family: var(--font-mono);
}

.price-change-percent {
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 2px;
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
    font-family: var(--font-mono);
}

.market-stats {
    display: flex;
    gap: 20px;
}

/* 右侧信息面板 - 精确定位避免与底部面板重叠 */
.info-panel {
    position: fixed !important;
    top: 88px !important; /* 工具栏44px + 策略栏44px */
    right: 0;
    bottom: 351px !important; /* 与底部面板保持精确间距：350px + 1px边框 */
    width: 300px;
    min-width: 300px;
    background: var(--bg-secondary) !important;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-primary);
    overflow: hidden;
    z-index: 40; /* 确保层级正确 */
}

/* 交易订单面板样式 */
.trading-order-panel {
    flex: 0 0 auto;
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-primary);
    padding: 0;
    max-height: 65%;
    min-height: 350px;
}

.order-panel-header {
    height: 32px;
    background: var(--bg-secondary) !important;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-primary);
}

.order-panel-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.order-panel-header h3 i {
    margin-right: 6px;
    color: var(--accent-blue);
}

/* 价格显示区域 */
.price-display-section {
    padding: 16px 12px;
    text-align: center;
    background: var(--bg-primary);
    margin: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.current-symbol {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.current-price-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.price-change-value {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.price-change-value.positive {
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.15);
}

.price-change-value.negative {
    color: var(--accent-red);
    background: rgba(255, 82, 82, 0.15);
}

/* 交易表单 */
.order-form {
    padding: 12px;
}

.order-type-tabs {
    display: flex;
    margin-bottom: 12px;
    background: var(--border-primary);
    border-radius: 4px;
    padding: 2px;
}

.order-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.order-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-quaternary);
}

.order-tab.active {
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
}

.order-inputs {
    margin-bottom: 12px;
}

.input-row {
    margin-bottom: 12px;
}

.input-row label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

/* 买卖按钮 */
.order-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.order-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.buy-btn {
    background: linear-gradient(135deg, #00c851, #007e33);
    border: 1px solid #00c851;
}

.buy-btn:hover {
    background: linear-gradient(135deg, #00a844, #006629);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 200, 81, 0.4);
}

.sell-btn {
    background: linear-gradient(135deg, #ff3547, #cc1e30);
    border: 1px solid #ff3547;
}

.sell-btn:hover {
    background: linear-gradient(135deg, #e6283a, #b51926);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 53, 71, 0.4);
}

.order-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 订单摘要 */
.order-summary {
    background: var(--bg-primary);
    border-radius: 4px;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 12px;
}

.summary-row:first-child {
    font-weight: 600;
}

.summary-row span:first-child {
    color: var(--text-muted);
}

.summary-row span:last-child {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* 市场监控面板样式 */
.market-watchlist-panel {
    flex: 1 1 auto;
    background: var(--bg-secondary) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 120px;
    max-height: 35%;
    position: relative;
}

.watchlist-header {
    height: 40px;
    background: var(--bg-secondary) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.watchlist-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.watchlist-header h3 i {
    margin-right: 6px;
    color: var(--accent-blue);
}

.watchlist-controls {
    display: flex;
    gap: 4px;
}

.watchlist-content {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 8px;
}

/* 底部数据面板 - 固定定位确保不与左侧面板重叠 */
.bottom-panel {
    height: 350px !important; /* 固定高度，提供更好的操作空间 */
    min-height: 350px !important; /* 与height保持一致 */
    max-height: 350px !important; /* 与height保持一致，防止resize导致重叠 */
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 35 !important; /* 提高层级，确保在合适位置 */
    pointer-events: auto !important;
    /* 暂时禁用resize功能以避免重叠 */
    resize: none !important;
}

/* 标签页容器 */
.panel-tabs {
    height: 40px;
    background: var(--bg-tertiary) !important;
    display: flex;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
    position: relative;
    z-index: 20 !important;
    overflow: hidden;
    pointer-events: auto !important;
}

.panel-content {
    flex: 1;
    position: relative;
    min-height: 0;
    background: var(--bg-secondary) !important;
    overflow: hidden;
    pointer-events: auto !important;
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    overflow: hidden;
    background: var(--bg-secondary) !important;
    padding: 8px;
    z-index: 1 !important;
    pointer-events: auto !important;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    pointer-events: auto !important;
}

/* 确保工作台标签内容布局正确 */
#strategy-editor-tab,
#strategy-library-tab,
#backtest-config-tab,
#backtest-report-tab,
#param-optimization-tab,
#strategy-logs-tab {
    background: var(--bg-secondary) !important;
    z-index: 1;
    position: relative;
}

/* 面板通用样式 */
.panel-section {
    border-bottom: 1px solid var(--border-primary);
    padding: 0;
    background: var(--bg-secondary) !important;
}

/* 策略配置部分占用更多空间 */
.strategy-config-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.strategy-config-section .strategy-form {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* 交易操作部分紧凑化，只占用必要空间 */
.trading-actions-section {
    flex: 0 0 auto;
    min-height: 60px;
}

.trading-actions-section h3 {
    margin-bottom: 8px;
}

.trading-actions-section .trading-buttons {
    padding: 8px 12px 12px 12px;
}

/* 账户信息保持紧凑 */
.account-section {
    flex: 0 0 auto;
}

.panel-section h3 {
    height: 32px;
    background: var(--bg-secondary) !important;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-section h3 i {
    margin-right: 6px;
    color: var(--accent-blue);
}

/* 账户信息样式 */
.account-section {
    flex: 0 0 auto;
    background: var(--bg-secondary) !important;
}

.account-stats {
    padding: 12px;
    background: var(--bg-secondary) !important;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-primary);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-row .value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.stat-row .value.profit {
    color: var(--accent-green);
}

.stat-row .value.loss {
    color: var(--accent-red);
}
/* 策略365天表现样式 - 确保不被底部面板遮挡 */
.strategy-performance-section {
    flex: 1 1 0; /* 允许缩小，但设置基础值为0 */
    overflow: hidden; /* 防止溢出 */
    display: flex;
    flex-direction: column;
    min-height: 200px; /* 设置最小高度确保内容可见 */
    max-height: calc(100vh - 439px - 40px); /* 精确计算：视口高度 - 顶部88px - 底部351px - 额外安全距离40px */
}

/* 平台视图中的performance-container - 严格控制高度避免被底部面板遮挡 */
.strategy-performance-section .performance-container {
    flex: 1 1 auto; /* 自动分配剩余空间 */
    overflow: hidden; /* 防止溢出 */
    padding: 8px;
    min-height: 0; /* 允许缩小 */
    max-height: calc(100vh - 479px); /* 精确计算：视口高度 - 顶部88px - 底部351px - section头部40px */
    display: flex;
    flex-direction: column;
}

/* 个人视图中的performance-container - 使用固定计算高度 */
.strategy-selection-section .performance-container {
    height: 100%; /* 占满父容器 */
    overflow: hidden; /* 防止溢出 */
    padding: 8px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.performance-container::-webkit-scrollbar {
    width: 14px; /* 增加滚动条宽度以提高可见性 */
    background: var(--bg-tertiary);
}

.performance-container::-webkit-scrollbar-track {
    background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-primary));
    border-radius: 7px;
    margin: 4px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.performance-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-blue), #1976d2);
    border-radius: 7px;
    border: 2px solid var(--bg-tertiary);
    min-height: 30px;
    box-shadow: 0 2px 6px rgba(42, 130, 228, 0.3);
}

.performance-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1976d2, #1565c0);
    box-shadow: 0 3px 8px rgba(42, 130, 228, 0.5);
}

/* 平台视图中的performance-list - 确保不被底部面板遮挡 */
.strategy-performance-section .performance-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto; /* 自动填充可用空间 */
    overflow-y: auto; /* 添加垂直滚动条 */
    overflow-x: hidden;
    padding-right: 8px; /* 为滚动条留出更多空间 */
    max-height: calc(100vh - 519px); /* 精确计算最大高度：视口高度 - 顶部88px - 底部351px - 容器边距80px */
    min-height: 150px; /* 设置最小高度 */
    scrollbar-width: thin;
    scrollbar-color: #787B86 var(--bg-tertiary);
}

/* 个人视图中的performance-list - 固定高度控制 */
.strategy-selection-section .performance-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: calc(100% - 16px); /* 减去padding */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #787B86 var(--bg-tertiary);
}

/* performance-list 滚动条样式 - 确保滚动条可见 */
.performance-list::-webkit-scrollbar {
    width: 16px; /* 增加宽度使滚动条更明显 */
    background: var(--bg-tertiary);
}

.performance-list::-webkit-scrollbar-track {
    background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-primary));
    border-radius: 8px;
    margin: 4px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
}

.performance-list::-webkit-scrollbar-thumb {
    background: #787B86; /* 保持用户要求的颜色 */
    border-radius: 8px;
    border: 2px solid var(--bg-tertiary);
    min-height: 40px; /* 增加最小高度 */
    box-shadow: 0 2px 8px rgba(120, 123, 134, 0.4);
}

.performance-list::-webkit-scrollbar-thumb:hover {
    background: #6A6D76; /* 悬停时稍微变暗 */
    box-shadow: 0 3px 10px rgba(120, 123, 134, 0.6);
}

.performance-list::-webkit-scrollbar-thumb:active {
    background: #5A5D66; /* 点击时更暗 */
}

.performance-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 14px;
    transition: all 0.2s ease;
}

.performance-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(42, 130, 228, 0.15);
}

.performance-card.active {
    border-color: var(--accent-blue);
    background: rgba(42, 130, 228, 0.05);
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.performance-header .strategy-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.performance-return {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.performance-return.profit {
    color: var(--accent-green);
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.performance-metrics .metric-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 1px solid var(--border-primary);
}

.performance-metrics .metric-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.performance-metrics .metric-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* 个人视图样式 - 使用相对定位作为定位基准 */
.personal-view {
    background: var(--bg-secondary) !important;
    position: relative !important; /* 作为绝对定位的基准 */
    height: 100% !important;
    overflow: hidden !important;
}

/* 策略选择区域 - 使用绝对定位确保不重叠 */
.strategy-selection-section {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 210px !important; /* 为personal-execution-section留出210px空间 */
    border-bottom: 1px solid var(--border-primary);
    overflow: hidden;
    background: var(--bg-secondary) !important;
    z-index: 1;
}

.strategy-selection {
    height: calc(100% - 40px); /* 减去section header高度 */
    overflow: hidden; /* 改为hidden，由内部performance-container控制滚动 */
    padding: 12px;
    position: relative;
}

.selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%; /* 占满父容器 */
    overflow-y: auto; /* 添加滚动条 */
    padding-right: 8px; /* 为滚动条留出空间 */
}

.selection-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.selection-card:hover {
    border-color: var(--accent-blue);
    background: var(--bg-tertiary);
}

.selection-card.active {
    border-color: var(--accent-green);
    background: rgba(0, 230, 118, 0.05);
}

/* 策略卡片头部 - 名称和状态 */
.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-primary);
}

.strategy-header .strategy-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.strategy-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.strategy-status.available {
    background: rgba(42, 130, 228, 0.15);
    color: var(--accent-blue);
}

.strategy-status.running {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
}

/* 策略详细信息 - 预期收益和风险等级 */
.strategy-details {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0;
    padding: 6px 10px;
    background: var(--bg-primary);
    border-radius: 4px;
    border: 1px solid var(--border-primary);
    gap: 20px;
    flex-wrap: nowrap;
}

/* 新的inline文本格式样式 */
.metric-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.metric-text strong {
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* 策略指标样式 */
.strategy-metric {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 风险等级颜色 - 适用于新旧格式 */
.metric-value.risk-low,
.risk-low {
    color: var(--accent-green);
}

.metric-value.risk-medium,
.risk-medium {
    color: #ffb627;
}

.metric-value.risk-high,
.risk-high {
    color: #ff9800;
}

.metric-value.risk-extreme,
.risk-extreme {
    color: var(--accent-red);
}

/* 策略操作按钮 */
.strategy-actions {
    display: flex;
    justify-content: center;
}

.btn-select-strategy {
    padding: 8px 16px;
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 80px;
}

.btn-select-strategy:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--bg-quaternary);
}

.btn-select-strategy.active {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
    cursor: default;
}

.selection-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.strategy-stats {
    display: flex;
    gap: 20px;
}

/* 通用统计项样式 */
.stat-item {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* 市场统计项样式 */
.market-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.market-stats .stat-item .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-stats .stat-item .value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* 个人执行状态样式 - 绝对定位在底部，永远不重叠 */
.personal-execution-section {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 210px !important; /* 固定高度 */
    overflow: hidden; /* 防止内容溢出 */
    z-index: 2; /* 确保在策略选择区域之上 */
    background: var(--bg-secondary) !important; /* 确保背景色正确 */
    border-top: 2px solid var(--border-primary); /* 添加明显的分隔线 */
    margin: 0; /* 移除margin */
    padding: 0; /* 移除padding，由内部元素控制 */
}

.execution-status {
    padding: 12px;
    height: calc(100% - 32px); /* 减去header的高度 */
    overflow-y: auto; /* 添加滚动以防内容过多 */
    overflow-x: hidden;
}

.status-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
}

.status-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-value.running {
    color: var(--accent-green);
}

.status-value.profit {
    color: var(--accent-green);
}

/* 量化策略运行状态样式 */
.strategy-runtime-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    justify-content: space-between;
    align-items: center;
}

.runtime-metric {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.runtime-metric strong {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 12px;
}

.runtime-metric strong.profit {
    color: var(--accent-green);
}

.runtime-metric strong.loss {
    color: var(--accent-red);
}

/* 响应式处理 - 在较小屏幕上换行 */
@media (max-width: 380px) {
    .strategy-runtime-overview {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .runtime-metric {
        justify-content: flex-start;
        padding: 4px 0;
        border-bottom: 1px solid var(--border-primary);
    }
    
    .runtime-metric:last-child {
        border-bottom: none;
    }
}

