/* =============================================
   模拟交易插件 - 优化完整CSS样式
   修复了响应式问题，添加了黑夜模式支持
============================================= */

/* 1. 基础容器样式 */
.swtool-simulation-container {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: #f0f3f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: hidden;
}

/* 2. 头部样式 */
.simulation-header {
    background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
    color: white;
    padding: 20px;
}

.account-overview h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
}

.account-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    white-space: nowrap;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* 3. 颜色定义 */
.profit {
    color: #ff4444 !important; /* 红色表示盈利/上涨 */
}

.loss {
    color: #44ff44 !important; /* 绿色表示亏损/下跌 */
}

.buy {
    color: #ff4444;
    font-weight: bold;
}

.sell {
    color: #44ff44;
    font-weight: bold;
}

/* 4. 主体布局 - 自适应修复 */
.simulation-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
    width: 100%;
    box-sizing: border-box;
}

/* 5. 面板样式 */
.trade-panel, .positions-panel {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.trade-panel {
    padding: 15px;
}

/* 6. 面板头部 */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-header h4 {
    margin: 0;
    color: #1e5799;
    font-size: 16px;
}

.market-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    background: #e8f5e9;
    color: #2e7d32;
    white-space: nowrap;
}

.market-status.open {
    background: #e8f5e9;
    color: #2e7d32;
}

.market-status.close {
    background: #ffebee;
    color: #c62828;
}

.market-status.debug {
    background: #F3E5F5;
    color: #7B1FA2;
    border: 1px solid #CE93D8;
}

/* 7. 交易表单 - 修复移动端显示 */
.trade-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.form-row label {
    min-width: 80px;
    font-size: 13px;
    text-align: right;
    color: #666;
    flex-shrink: 0;
}

.trade-input, .trade-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
    max-width: 100%;
    box-sizing: border-box;
}

.trade-input:focus, .trade-select:focus {
    outline: none;
    border-color: #1e5799;
    box-shadow: 0 0 0 2px rgba(30, 87, 153, 0.1);
}

/* 价格高亮显示 */
#trade-price:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
    animation: priceHighlight 1s ease-in-out;
}

@keyframes priceHighlight {
    0% { background-color: #fff; }
    50% { background-color: #e8f4ff; }
    100% { background-color: #fff; }
}

.quote-button {
    padding: 8px 15px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.quote-button:hover {
    background: #0d8bf2;
}

/* 8. 交易类型选择器 - 优化显示 */
.trade-type-selector {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
}

.trade-type-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
    min-width: 80px;
    box-sizing: border-box;
}

#trade-buy-btn {
    background: linear-gradient(to bottom, #fff, #f5f5f5);
    color: #ff4444;
    border: 2px solid #ff4444;
}

#trade-sell-btn {
    background: linear-gradient(to bottom, #fff, #f5f5f5);
    color: #44ff44;
    border: 2px solid #44ff44;
}

#trade-buy-btn.active {
    background: linear-gradient(to bottom, #ff4444, #cc0000);
    color: white;
    border-color: #cc0000;
    box-shadow: 0 4px 0 #990000;
}

#trade-sell-btn.active {
    background: linear-gradient(to bottom, #44ff44, #00cc00);
    color: white;
    border-color: #00cc00;
    box-shadow: 0 4px 0 #009900;
}

.trade-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.trade-type-btn:active {
    transform: translateY(0);
}

/* 9. 快速设置按钮 */
.price-quick-set, .quantity-quick-set {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.quick-price, .quick-quantity {
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.quick-price:hover, .quick-quantity:hover {
    background: #f5f5f5;
}

/* 10. 手续费显示 */
.fee-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
    gap: 5px;
}

/* 11. 标签页切换 */
.panel-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.panel-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    text-align: center;
    min-width: 80px;
    box-sizing: border-box;
}

.panel-tab.active {
    background: white;
    border-bottom-color: #1e5799;
    font-weight: bold;
}

/* 12. Tab内容区域 */
.tab-content {
    display: none;
    padding: 15px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.tab-content.active {
    display: block;
}

/* 13. 表格通用样式 - 修复PC端显示问题 */
/* 13. 表格容器样式 - 添加横向滚动 */
.tab-content {
    display: none;
    padding: 15px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.tab-content.active {
    display: block;
}

/* 表格包装容器 */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    border-radius: 4px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

/* 14. 表格通用样式 - 固定列宽 */
.positions-table, .transactions-table, 
.history-table, .watchlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 800px; /* 最小宽度确保所有列都能显示 */
    table-layout: auto; /* 自动列宽 */
}

/* 持仓表格列宽优化 */
.positions-table {
    min-width: 900px; /* 持仓列更多，需要更宽 */
}

.positions-table th, .positions-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap; /* 防止换行 */
    text-align: center; /* 居中对齐 */
}

/* 固定重要列的宽度 */
.positions-table th:nth-child(1),  /* 代码 */
.positions-table td:nth-child(1) {
    min-width: 80px;
    max-width: 100px;
    text-align: left;
}

.positions-table th:nth-child(2),  /* 名称 */
.positions-table td:nth-child(2) {
    min-width: 120px;
    max-width: 150px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.positions-table th:nth-child(3),  /* 持仓 */
.positions-table th:nth-child(4),  /* 可用 */
.positions-table th:nth-child(5),  /* 成本 */
.positions-table th:nth-child(6),  /* 现价 */
.positions-table th:nth-child(7),  /* 市值 */
.positions-table th:nth-child(8) { /* 盈亏 */
    min-width: 70px;
    max-width: 100px;
}

.positions-table td:nth-child(3),
.positions-table td:nth-child(4),
.positions-table td:nth-child(5),
.positions-table td:nth-child(6),
.positions-table td:nth-child(7),
.positions-table td:nth-child(8) {
    min-width: 70px;
    max-width: 100px;
}

.positions-table th:nth-child(9),  /* 操作 */
.positions-table td:nth-child(9) {
    min-width: 60px;
    max-width: 80px;
}

/* 表头样式 */
.positions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 交易记录表格优化 */
.transactions-table {
    min-width: 700px;
}

.transactions-table th, .transactions-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

.transactions-table th:nth-child(1), /* 时间 */
.transactions-table td:nth-child(1) {
    min-width: 70px;
    max-width: 90px;
}

.transactions-table th:nth-child(2), /* 市场 */
.transactions-table td:nth-child(2) {
    min-width: 50px;
    max-width: 70px;
}

.transactions-table th:nth-child(3), /* 代码 */
.transactions-table td:nth-child(3) {
    min-width: 80px;
    max-width: 100px;
    text-align: left;
}

.transactions-table th:nth-child(4), /* 类型 */
.transactions-table td:nth-child(4) {
    min-width: 60px;
    max-width: 80px;
}

.transactions-table th:nth-child(5), /* 价格 */
.transactions-table th:nth-child(6), /* 数量 */
.transactions-table th:nth-child(7), /* 金额 */
.transactions-table th:nth-child(8) { /* 状态 */
    min-width: 70px;
    max-width: 90px;
}

.transactions-table td:nth-child(5),
.transactions-table td:nth-child(6),
.transactions-table td:nth-child(7),
.transactions-table td:nth-child(8) {
    min-width: 70px;
    max-width: 90px;
}

.transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 自选股表格优化 */
.watchlist-table {
    min-width: 600px;
}

.watchlist-table th, .watchlist-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

.watchlist-table th:nth-child(1), /* 代码 */
.watchlist-table td:nth-child(1) {
    min-width: 80px;
    max-width: 100px;
    text-align: left;
}

.watchlist-table th:nth-child(2), /* 名称 */
.watchlist-table td:nth-child(2) {
    min-width: 120px;
    max-width: 150px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watchlist-table th:nth-child(3), /* 现价 */
.watchlist-table th:nth-child(4), /* 涨跌幅 */
.watchlist-table th:nth-child(5) { /* 操作 */
    min-width: 70px;
    max-width: 100px;
}

.watchlist-table td:nth-child(3),
.watchlist-table td:nth-child(4),
.watchlist-table td:nth-child(5) {
    min-width: 70px;
    max-width: 100px;
}

.watchlist-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 历史表格优化 */
.history-table {
    min-width: 900px;
}

.history-table th, .history-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

.history-table th:nth-child(1), /* 日期 */
.history-table td:nth-child(1) {
    min-width: 80px;
    max-width: 100px;
}

.history-table th:nth-child(2), /* 时间 */
.history-table td:nth-child(2) {
    min-width: 70px;
    max-width: 90px;
}

.history-table th:nth-child(3), /* 市场 */
.history-table td:nth-child(3) {
    min-width: 50px;
    max-width: 70px;
}

.history-table th:nth-child(4), /* 代码 */
.history-table td:nth-child(4) {
    min-width: 80px;
    max-width: 100px;
    text-align: left;
}

.history-table th:nth-child(5), /* 名称 */
.history-table td:nth-child(5) {
    min-width: 120px;
    max-width: 150px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-table th:nth-child(6), /* 类型 */
.history-table td:nth-child(6) {
    min-width: 60px;
    max-width: 80px;
}

.history-table th:nth-child(7), /* 价格 */
.history-table th:nth-child(8), /* 数量 */
.history-table th:nth-child(9), /* 金额 */
.history-table th:nth-child(10), /* 手续费 */
.history-table th:nth-child(11) { /* 状态 */
    min-width: 70px;
    max-width: 90px;
}

.history-table td:nth-child(7),
.history-table td:nth-child(8),
.history-table td:nth-child(9),
.history-table td:nth-child(10),
.history-table td:nth-child(11) {
    min-width: 70px;
    max-width: 90px;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 表格行悬停效果 */
.positions-table tr:hover, 
.transactions-table tr:hover, 
.watchlist-table tr:hover,
.history-table tr:hover {
    background: #f5f9ff !important;
}

/* 操作按钮样式 */
.quick-sell, .remove-watchlist {
    padding: 6px 10px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    min-width: 40px;
    white-space: nowrap;
}

.quick-sell {
    background: #44ff44;
}

.quick-sell:hover {
    background: #00cc00;
}

.remove-watchlist {
    background: #ff6b6b;
}

.remove-watchlist:hover {
    background: #ff5252;
}

/* 表格列样式优化 */
.symbol-code {
    font-weight: bold;
    color: #1e5799;
    font-family: 'Courier New', monospace;
}

.symbol-name {
    color: #333;
}

.current-price {
    font-weight: bold;
    color: #333;
}

/* 表格滚动条样式 */
.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 移动端表格优化 */
@media (max-width: 768px) {
    .table-container {
        border: none;
        margin: 0 -10px;
        width: calc(100% + 20px);
    }
    
    .positions-table, 
    .transactions-table, 
    .watchlist-table, 
    .history-table {
        font-size: 12px;
        min-width: 700px;
    }
    
    .positions-table th, .positions-table td,
    .transactions-table th, .transactions-table td,
    .watchlist-table th, .watchlist-table td,
    .history-table th, .history-table td {
        padding: 8px 6px;
    }
    
    /* 移动端缩小列宽 */
    .positions-table th:nth-child(1), .positions-table td:nth-child(1),
    .positions-table th:nth-child(2), .positions-table td:nth-child(2),
    .transactions-table th:nth-child(3), .transactions-table td:nth-child(3),
    .watchlist-table th:nth-child(1), .watchlist-table td:nth-child(1),
    .watchlist-table th:nth-child(2), .watchlist-table td:nth-child(2),
    .history-table th:nth-child(4), .history-table td:nth-child(4),
    .history-table th:nth-child(5), .history-table td:nth-child(5) {
        min-width: 60px;
        max-width: 80px;
    }
}

/* 黑夜模式下的表格样式 */
body.dark-mode .table-container {
    border-color: #444;
}

body.dark-mode .positions-table th,
body.dark-mode .transactions-table th,
body.dark-mode .watchlist-table th,
body.dark-mode .history-table th {
    background-color: #3d3d3d;
    color: #ffffff;
    border-bottom-color: #555;
}

body.dark-mode .positions-table td,
body.dark-mode .transactions-table td,
body.dark-mode .watchlist-table td,
body.dark-mode .history-table td {
    background-color: #2d2d2d;
    color: #ffffff;
    border-bottom-color: #444;
}

body.dark-mode .positions-table tr:hover,
body.dark-mode .transactions-table tr:hover,
body.dark-mode .watchlist-table tr:hover,
body.dark-mode .history-table tr:hover {
    background-color: #3d3d3d !important;
}

body.dark-mode .symbol-code {
    color: #64b5f6;
}

body.dark-mode .symbol-name {
    color: #dddddd;
}

body.dark-mode .current-price {
    color: #ffffff;
}

/* 14. 表格行悬停和点击效果 */
.positions-table tr:hover, .watchlist-table tr:hover {
    background: #f5f9ff !important;
}

.positions-table tr, .transactions-table tr, .watchlist-table tr {
    cursor: pointer;
    transition: all 0.2s;
}

.positions-table tr:hover, .transactions-table tr:hover, .watchlist-table tr:hover {
    background-color: #e8f4ff !important;
    transform: translateX(5px);
}

#watchlist-body tr.clickable::after,
#positions-content tbody tr::after {
    content: "↗";
    position: absolute;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    color: #2196F3;
    font-size: 16px;
}

#watchlist-body tr.clickable:hover::after,
#positions-content tbody tr:hover::after {
    opacity: 1;
}

/* 交易记录特殊样式 */
.transaction-buy {
    background: #fff5f5;
}

.transaction-sell {
    background: #f5fff5;
}

/* 15. 操作按钮 */
.quick-sell, .remove-watchlist {
    padding: 6px 12px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    min-width: 50px;
    white-space: nowrap;
}

.quick-sell {
    background: #44ff44;
}

.quick-sell:hover {
    background: #00cc00;
}

.remove-watchlist {
    background: #ff6b6b;
}

.remove-watchlist:hover {
    background: #ff5252;
}

/* 16. 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
    font-size: 14px;
}

.no-transactions {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 17. 账户操作按钮容器 */
.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.action-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-width: 100px;
    flex: 1;
    max-width: 200px;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-button:active {
    transform: translateY(0);
}

.action-button.refresh {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
}

.action-button.reset {
    background: linear-gradient(135deg, #FF9800 0%, #EF6C00 100%);
    color: white;
}

.action-button.history {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
    color: white;
}

.action-button.debug {
    background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%);
    color: white;
}

.action-button.refresh:hover {
    background: linear-gradient(135deg, #43A047 0%, #1B5E20 100%);
}

.action-button.reset:hover {
    background: linear-gradient(135deg, #FB8C00 0%, #E65100 100%);
}

.action-button.history:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #0D47A1 100%);
}

.action-button.debug:hover {
    background: linear-gradient(135deg, #8E24AA 0%, #4A148C 100%);
}

/* 刷新按钮动画 */
.action-button.refresh:active {
    transform: rotate(360deg);
    transition: transform 0.5s;
}

/* 18. 加载动画 */
@keyframes loadingPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.account-stats.loading .stat-value {
    animation: loadingPulse 1.5s infinite;
    color: #999 !important;
}

/* 持仓刷新效果 */
.positions-table tr.updating {
    background-color: #fffde7 !important;
    transition: background-color 0.3s;
}

/* 交易成功动画效果 */
@keyframes tradeSuccess {
    0% { background-color: #fff; }
    50% { background-color: #e8f5e9; }
    100% { background-color: #fff; }
}

.transaction-buy.success-animation,
.transaction-sell.success-animation {
    animation: tradeSuccess 2s ease-in-out;
}

/* 19. 底部区域 */
.simulation-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
    width: 100%;
}

.recent-transactions h4 {
    margin: 0 0 15px 0;
    color: #1e5799;
}

/* 20. 对话框样式 */
.simulation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.dialog-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    min-width: 400px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    width: 90%;
    box-sizing: border-box;
}

.wide-dialog {
    min-width: 800px;
    max-width: 90vw;
}

.dialog-content h3 {
    margin: 0 0 20px 0;
    color: #1e5799;
}

.warning-text {
    color: #ff9800;
    font-weight: bold;
    padding: 10px;
    background: #fff3e0;
    border-radius: 4px;
    margin: 15px 0;
}

/* 确认对话框按钮样式 */
.confirm-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modify-btn, .confirm-btn, .cancel-btn, .danger-btn, .export-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 80px;
    box-sizing: border-box;
}

.modify-btn {
    background: #757575;
    color: white;
    flex: 1;
}

.confirm-btn {
    background: #4CAF50;
    color: white;
    flex: 2;
}

.cancel-btn {
    background: #f44336;
    color: white;
    flex: 1;
}

.danger-btn {
    background: #f44336;
    color: white;
}

.export-btn {
    background: #2196F3;
    color: white;
}

.modify-btn:hover {
    background: #616161;
}

.confirm-btn:hover {
    background: #45a049;
}

.cancel-btn:hover, .danger-btn:hover {
    background: #d32f2f;
}

.export-btn:hover {
    background: #0d8bf2;
}

/* 21. 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    min-width: 40px;
}

.pagination-btn:hover {
    background: #f5f5f5;
}

/* 22. 登录提示 */
.swtool-simulation-login-required {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.swtool-simulation-login-required p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.swtool-button {
    padding: 12px 30px;
    background: #1e5799;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s;
}

.swtool-button:hover {
    background: #154273;
    transform: translateY(-1px);
}

/* 23. 股票搜索相关 */
.watchlist-management {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    flex-wrap: wrap;
}

#add-watchlist-symbol, #trade-symbol {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    position: relative;
    min-width: 150px;
    box-sizing: border-box;
}

#add-watchlist-symbol:focus, #trade-symbol:focus {
    outline: none;
    border-color: #2196F3;
}

#add-to-watchlist, #refresh-watchlist {
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

#refresh-watchlist {
    background: #4CAF50;
}

#add-to-watchlist:hover {
    background: #0d8bf2;
}

#refresh-watchlist:hover {
    background: #45a049;
}

/* 24. 搜索结果样式 */
.stock-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stock-search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    word-break: break-word;
}

.stock-search-result-item:hover {
    background-color: #f5f9ff !important;
}

/* 25. 消息提示 */
.simulation-message {
    padding: 10px 15px;
    margin: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    z-index: 10000;
    position: relative;
    max-width: 100%;
    word-break: break-word;
}

.simulation-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.simulation-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.simulation-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 26. 滚动条美化 */
.tab-content::-webkit-scrollbar,
.stock-search-results::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track,
.stock-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb,
.stock-search-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover,
.stock-search-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 27. 响应式设计 - 修复移动端显示 */
@media (max-width: 1200px) {
    .simulation-body {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dialog-content.wide-dialog {
        min-width: 95vw;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .swtool-simulation-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .simulation-header,
    .simulation-body,
    .simulation-footer {
        padding: 15px;
    }
    
    .account-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .account-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-button {
        width: 100%;
        max-width: 100%;
        margin-bottom: 8px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .form-row label {
        width: 100%;
        text-align: left;
        margin-bottom: 4px;
    }
    
    .trade-input, .trade-select {
        width: 100%;
        min-width: auto;
    }
    
    .trade-type-selector {
        flex-direction: column;
    }
    
    .trade-type-btn {
        width: 100%;
        padding: 10px;
    }
    
    .panel-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .panel-tab {
        flex: none;
        min-width: 100px;
        white-space: nowrap;
    }
    
    .tab-content {
        min-height: 300px;
        max-height: 400px;
        padding: 10px;
    }
    
    .dialog-content {
        min-width: 90vw;
        margin: 10px;
        padding: 20px;
    }
    
    .confirm-actions {
        flex-direction: column;
    }
    
    .modify-btn, .confirm-btn, .cancel-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    /* 表格在小屏幕上优化 */
    .positions-table, .transactions-table, 
    .history-table, .watchlist-table {
        font-size: 12px;
    }
    
    .positions-table th, .positions-table td,
    .transactions-table th, .transactions-table td,
    .history-table th, .history-table td,
    .watchlist-table th, .watchlist-table td {
        padding: 6px 4px;
    }
    
    .symbol-code, .symbol-name, .current-price, .actions {
        width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .account-stats {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .trade-form {
        gap: 10px;
    }
    
    .fee-details {
        flex-direction: column;
        gap: 5px;
    }
    
    .watchlist-management {
        flex-direction: column;
    }
    
    #add-to-watchlist, #refresh-watchlist {
        width: 100%;
    }
}

/* 28. 黑夜模式支持 */
body.dark-mode .swtool-simulation-container {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode .simulation-header {
    background: linear-gradient(135deg, #0d2b4d 0%, #154273 100%);
}

body.dark-mode .trade-panel,
body.dark-mode .positions-panel,
body.dark-mode .simulation-footer,
body.dark-mode .dialog-content {
    background-color: #2d2d2d;
    color: #ffffff;
}

body.dark-mode .panel-header h4 {
    color: #64b5f6;
}

body.dark-mode .form-row label {
    color: #bbbbbb;
}

body.dark-mode .trade-input,
body.dark-mode .trade-select {
    background-color: #3d3d3d;
    border-color: #555;
    color: #ffffff;
}

body.dark-mode .trade-input:focus,
body.dark-mode .trade-select:focus {
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2);
}

body.dark-mode .panel-tabs {
    background-color: #3d3d3d;
    border-bottom-color: #555;
}

body.dark-mode .panel-tab {
    color: #bbbbbb;
}

body.dark-mode .panel-tab.active {
    background-color: #2d2d2d;
    color: #64b5f6;
}

body.dark-mode .positions-table th,
body.dark-mode .transactions-table th,
body.dark-mode .history-table th,
body.dark-mode .watchlist-table th {
    background-color: #3d3d3d;
    color: #ffffff;
    border-bottom-color: #555;
}

body.dark-mode .positions-table td,
body.dark-mode .transactions-table td,
body.dark-mode .history-table td,
body.dark-mode .watchlist-table td {
    background-color: #2d2d2d;
    color: #ffffff;
    border-bottom-color: #444;
}

body.dark-mode .positions-table tr:hover,
body.dark-mode .transactions-table tr:hover,
body.dark-mode .watchlist-table tr:hover {
    background-color: #3d3d3d !important;
}

body.dark-mode .symbol-code {
    color: #64b5f6;
}

body.dark-mode .symbol-name {
    color: #dddddd;
}

body.dark-mode .current-price {
    color: #ffffff;
}

body.dark-mode .profit {
    color: #ff6b6b !important;
}

body.dark-mode .loss {
    color: #4cd964 !important;
}

body.dark-mode .market-status {
    background-color: #3d3d3d;
    color: #bbbbbb;
}

body.dark-mode .market-status.open {
    background-color: #2e7d32;
    color: #ffffff;
}

body.dark-mode .market-status.close {
    background-color: #c62828;
    color: #ffffff;
}

body.dark-mode .action-button {
    background-color: #3d3d3d;
    color: #ffffff;
}

body.dark-mode .action-button:hover {
    background-color: #4d4d4d;
}

body.dark-mode .simulation-message.success {
    background-color: #1b5e20;
    color: #c8e6c9;
    border-color: #2e7d32;
}

body.dark-mode .simulation-message.error {
    background-color: #c62828;
    color: #ffcdd2;
    border-color: #d32f2f;
}



/* 29. 打印样式 */
@media print {
    .simulation-dialog,
    .stock-search-results,
    .account-actions,
    .actions button,
    .trade-type-selector,
    .quote-button {
        display: none !important;
    }
    
    .swtool-simulation-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .trade-panel, .positions-panel {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 登录按钮样式 */
.action-button.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    min-width: 120px;
    text-align: center;
}

.action-button.login-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
    color: white;
    text-decoration: none;
}

.action-button.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.action-button.login-btn:before {
    content: "🔑";
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .action-button.login-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 100px;
    }
}

/* 登录链接样式 */
.login-link {
    display: inline-block;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.login-link:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    color: white;
    text-decoration: none;
}

/* 游客状态样式 */
.guest-stats {
    opacity: 0.8;
}

.guest-notice {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 15px;
    text-align: center;
    color: #6c757d;
}

.guest-notice p {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.guest-notice p:before {
    content: "👋";
    font-size: 16px;
}

/* 游客操作按钮样式 */
.guest-action {
    background: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.guest-action:hover {
    background: #5a6268 !important;
    transform: none !important;
}

/* 空状态样式增强 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state p:first-child {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p:last-child {
    font-size: 14px;
    margin-bottom: 15px;
}

/* 其他按钮样式调整以保持一致 */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-decoration: none;
}

.action-button.refresh {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.action-button.reset {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.action-button.history {
    background: linear-gradient(135deg, #6f42c1 0%, #593d9b 100%);
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-button:active {
    transform: translateY(0);
}

/* 跟单交易按钮样式 */
.holding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.holding-header h5.padded {
    margin: 0;
}

.follow-trade-actions {
    display: flex;
    align-items: center;
}

.follow-trade-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.follow-trade-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.3);
    color: white;
    text-decoration: none;
}

.follow-trade-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.follow-icon {
    font-size: 16px;
}

/* 游客跟单按钮 */
.follow-trade-btn.guest-follow {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.2);
    position: relative;
}

.follow-trade-btn.guest-follow:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.3);
}

.follow-trade-btn.guest-follow:hover:after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 100;
}

.follow-trade-btn.guest-follow:hover:before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
    z-index: 100;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .holding-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .follow-trade-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .follow-trade-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 净值曲线样式 */
#nav-chart-content {
    padding: 15px;
}

.nav-chart-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.nav-chart-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.nav-chart-actions {
    display: flex;
    gap: 8px;
}

.nav-chart-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.nav-chart-wrapper {
    height: 300px;
    position: relative;
}

.nav-chart-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: white;
    padding: 20px;
}

.nav-summary {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.nav-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-card {
    background: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
}

.stat-value.positive {
    color: #f44336;
}

.stat-value.negative {
    
    color: #4CAF50;
}

.nav-filter {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.filter-btn {
    padding: 6px 15px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn:hover {
    background: #0b7dda;
}

.nav-data-table {
    padding: 20px;
    border-top: 1px solid #eee;
}

.table-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.nav-table {
    width: 100%;
    border-collapse: collapse;
}

.nav-table th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: #555;
}

.nav-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.nav-table tr:hover {
    background: #f9f9f9;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 20px !important;
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-chart-content {
        grid-template-columns: 1fr;
    }
    
    .nav-chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .nav-chart-actions {
        justify-content: flex-start;
    }
    
    .nav-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 添加在样式部分 */
.no-data-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #fafafa;
    border-radius: 8px;
}

.info-message {
    background: #e3f2fd;
    color: #1976d2;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
    border-left: 4px solid #2196f3;
}

.hs300-note {
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.stat-note {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

/* 净值图表容器样式 */
.nav-chart-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-chart-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-chart-wrapper {
    width: 100%;
    height: 300px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 图表下方的统计信息 */
.nav-stats-below {
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.nav-stats-grid-below {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.nav-stats-grid-below .stat-card {
    flex: 1;
    min-width: 180px;
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.nav-stats-grid-below .stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.nav-stats-grid-below .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.nav-stats-grid-below .stat-value.positive {
    color: #e53935;
}

.nav-stats-grid-below .stat-value.negative {
    color: #43a047;
}

.nav-stats-grid-below .stat-note {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    font-weight: normal;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-stats-grid-below {
        flex-direction: column;
    }
    
    .nav-stats-grid-below .stat-card {
        min-width: 100%;
    }
}

/* 沪深300备注 */
.hs300-note {
    margin-top: 15px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 12px;
    color: #1976d2;
    text-align: center;
}

/* 筛选器样式 */
.nav-filter {
    background: white;
    border-radius: 6px;
    padding: 12px 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

.range-select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.filter-btn {
    padding: 6px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: #0056b3;
}

/* 委托相关样式 */
.orders-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    align-items: center;
}

.order-filter-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.orders-table th {
    background: #f1f3f5;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.orders-table td {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.orders-table .order-row:hover {
    background-color: #f8f9fa;
}

.order-time {
    font-size: 12px;
    color: #6c757d;
}

.order-symbol {
    font-weight: 600;
    color: #212529;
}

.order-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-type.type-buy {
    color: #28a745;
    font-weight: 600;
}

.order-type.type-sell {
    color: #dc3545;
    font-weight: 600;
}

.order-direction {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.direction-long {
    background-color: #d4edda;
    color: #155724;
}

.direction-short {
    background-color: #f8d7da;
    color: #721c24;
}

.order-price {
    font-weight: 600;
    color: #212529;
}

.current-price-cell {
    position: relative;
}

.price-higher {
    color: #dc3545;
}

.price-lower {
    color: #28a745;
}

.current-price-cell small {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
}

.order-quantity {
    font-weight: 600;
    color: #495057;
}

.order-status {
    position: relative;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending .status-badge {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-completed .status-badge {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-cancelled .status-badge {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.can-trade-badge {
    display: inline-block;
    margin-left: 5px;
    color: #28a745;
    font-weight: bold;
    font-size: 14px;
}

.cancel-order-btn {
    padding: 4px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cancel-order-btn:hover {
    background: #c82333;
}

.no-action {
    color: #6c757d;
    font-style: italic;
}

.orders-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 6px;
    font-size: 13px;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    color: #6c757d;
}

.summary-item .value {
    font-weight: 600;
    color: #212529;
    margin-left: 5px;
}

.loading-data {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

body.dark-mode .simulation-message.info {
    background-color: #0277bd;
    color: #b3e5fc;
    border-color: #0288d1;
}

body.dark-mode .watchlist-management {
    background-color: #3d3d3d;
}
/*清仓*/
/* 清仓按钮样式 - 橙色系 */
.trade-type-btn.liquidate-btn {
    background-color: #f39c12 !important;
    color: white !important;
    border-color: #e67e22 !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.2);
    position: relative;
    overflow: hidden;
}

.trade-type-btn.liquidate-btn:hover {
    background-color: #e67e22 !important;
    border-color: #d35400 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

.trade-type-btn.liquidate-btn:active {
    background-color: #d35400 !important;
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(211, 84, 0, 0.2);
}

/* 添加脉冲效果，突出清仓按钮的特殊性 */
.trade-type-btn.liquidate-btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.trade-type-btn.liquidate-btn:focus:not(:active)::after {
    animation: pulse 1s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(30, 30);
        opacity: 0;
    }
}

/* ========== 暗色模式适配 ========== */

/* 清仓按钮 - 暗色模式 */
body.dark-mode .trade-type-btn.liquidate-btn {
    background-color: #f39c12 !important;
    color: #1a1a1a !important;
    border-color: #e67e22 !important;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

body.dark-mode .trade-type-btn.liquidate-btn:hover {
    background-color: #e67e22 !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

body.dark-mode .trade-type-btn.liquidate-btn:active {
    background-color: #d35400 !important;
    color: #ffffff !important;
}

/* 清仓按钮在暗色模式下的脉冲效果 */
body.dark-mode .trade-type-btn.liquidate-btn:after {
    background: rgba(255, 255, 255, 0.8);
}

/* 确保其他交易类型按钮在暗色模式下也有正确的样式 */
body.dark-mode .trade-type-btn {
    background-color: #3d3d3d;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .trade-type-btn.active {
    background-color: #4a4a4a;
    color: white;
    border-color: #666;
}

body.dark-mode .trade-type-btn[data-type="buy"].active,
body.dark-mode .trade-type-btn[data-type="buy"]:hover {
    background-color: #4caf50;
    color: white;
}

body.dark-mode .trade-type-btn[data-type="sell"].active,
body.dark-mode .trade-type-btn[data-type="sell"]:hover {
    background-color: #f44336;
    color: white;
}

/* 交易类型选择器容器 - 暗色模式 */
body.dark-mode .trade-type-selector {
    background-color: #2d2d2d;
    border-color: #444;
}

/* 清仓按钮图标或提示（可选） */
.trade-type-btn.liquidate-btn::before {
    content: "⚠️";
    font-size: 12px;
    margin-right: 4px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

body.dark-mode .trade-type-btn.liquidate-btn::before {
    filter: drop-shadow(0 2px 2px rgba(255,255,255,0.2));
}

/* 响应式调整 */
@media (max-width: 768px) {
    .trade-type-btn.liquidate-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .trade-type-btn.liquidate-btn::before {
        font-size: 11px;
        margin-right: 3px;
    }
}

/* 当清仓按钮被禁用时的样式 */
.trade-type-btn.liquidate-btn:disabled,
.trade-type-btn.liquidate-btn.disabled {
    background-color: #f8c471 !important;
    border-color: #f5a623 !important;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.dark-mode .trade-type-btn.liquidate-btn:disabled,
body.dark-mode .trade-type-btn.liquidate-btn.disabled {
    background-color: #b9770e !important;
    border-color: #9c640c !important;
    color: #cccccc !important;
    opacity: 0.4;
}

/* 添加一个轻微的红色闪烁效果，用于警示 */
.trade-type-btn.liquidate-btn.warning-effect {
    animation: warningFlash 2s infinite;
}

@keyframes warningFlash {
    0%, 100% {
        background-color: #f39c12;
        box-shadow: 0 2px 4px rgba(243, 156, 18, 0.2);
    }
    50% {
        background-color: #e67e22;
        box-shadow: 0 4px 12px rgba(230, 126, 34, 0.5);
    }
}

/* 暗色模式下的警示效果 */
body.dark-mode .trade-type-btn.liquidate-btn.warning-effect {
    animation: darkWarningFlash 2s infinite;
}

@keyframes darkWarningFlash {
    0%, 100% {
        background-color: #f39c12;
        color: #1a1a1a;
        box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
    }
    50% {
        background-color: #e67e22;
        color: #000000;
        box-shadow: 0 4px 15px rgba(230, 126, 34, 0.6);
    }
}

/* 设置资金按钮样式 */
.action-button.set-capital {
    background-color: #28a745;
    color: white;
}

.action-button.set-capital:hover {
    background-color: #218838;
}

/* 确保所有账户操作按钮在移动设备上排列良好 */
@media (max-width: 768px) {
    .account-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .action-button {
        font-size: 12px;
        padding: 4px 8px;
    }
}

