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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: width 0.3s ease;
}

/* 收起状态 */
.sidebar.collapsed {
    width: 60px;
    padding: 20px 10px;
}

.sidebar.collapsed .sidebar-content {
    display: none;
}

.sidebar.collapsed .sidebar-toggle .toggle-icon {
    transform: rotate(180deg);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e6ed;
}

.sidebar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.sidebar-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.toggle-icon {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-title {
    justify-content: center;
}

.sidebar.collapsed .sidebar-title h1 {
    display: none;
}

.sidebar-header h1 {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 15px;
}

.trading-pair-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.trading-pair-section label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.trading-pair-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.trading-pair-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.update-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.update-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
}

/* 导航菜单 */
.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: block;
    padding: 12px 15px;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 65, 108, 0.3);
}

.cache-update-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.cache-update-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
}

.cache-update-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    margin: 50px auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 300;
}

/* 内容卡片 */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 300;
}

.card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 500;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 1px;
}

/* 四列布局优化 */
.form-row.four-columns {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .form-row.four-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row.four-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .form-row.four-columns {
        grid-template-columns: 1fr;
    }
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #2ac90e 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #285ec9 0%, #200a9b 100%);
    color: white;
}

.btn-clear {
    background: linear-gradient(135deg, #d6e81b 0%, #b1d50c 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 3px solid #808181;
    font-size: 14px;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

.table tr:hover {
    background: #f8f9fa;
}

.text-center {
    text-align: center;
}

/* 筛选器 */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 120px;
}

/* 统计信息 */
.stats-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    min-width: 120px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
}

/* 资产汇总 */
.assets-summary {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.summary-asset {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.summary-amount {
    font-size: 18px;
    color: #28a745;
}

/* 模态框 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 5px;
}

/* 状态样式 */
.status-running {
    color: #28a745;
    font-weight: 600;
}

.status-stopped {
    color: #dc3545;
    font-weight: 600;
}

.status-online {
    color: #28a745;
}

.status-offline {
    color: #dc3545;
}

/* 消息提示 */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .sidebar.collapsed {
        width: 100%;
        padding: 20px 10px;
    }

    .sidebar.collapsed .sidebar-content {
        display: none;
    }

    .sidebar.collapsed .sidebar-title h1 {
        display: none;
    }

    .sidebar.collapsed .sidebar-title {
        justify-content: center;
    }

    .main-content {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .card-actions {
        flex-direction: column;
    }

    .stats-container {
        flex-direction: column;
    }

    .table {
        font-size: 12px;
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}

/* 任务配置样式 */
.task-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.config-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.config-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

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

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 任务详情样式 */
.task-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.detail-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.detail-item {
    margin-bottom: 10px;
    font-size: 14px;
}

.detail-item strong {
    color: #495057;
    min-width: 120px;
    display: inline-block;
}

/* 任务操作按钮 */
.task-actions {
    white-space: nowrap;
}

.task-actions .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 用户管理样式 */
.user-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.info-label {
    font-weight: 500;
    color: #495057;
}

.info-value {
    color: #6c757d;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 12px;
    color: #6c757d;
}

/* 设置网格 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.setting-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 5px;
    cursor: pointer;
}

.setting-desc {
    color: #6c757d;
    font-size: 12px;
}

/* 安全设置 */
.security-settings {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

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

.security-info h4 {
    margin: 0 0 5px 0;
    color: #495057;
    font-size: 16px;
}

.security-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* IP白名单 */
.ip-list {
    margin-top: 20px;
}

.ip-list h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
}

/* 深色模式 */
.dark-mode {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
}

.dark-mode .sidebar {
    background: rgba(44, 62, 80, 0.95);
    color: #ecf0f1;
}

.dark-mode .sidebar-toggle {
    background: linear-gradient(135deg, #8aa0ff 0%, #9b59b6 100%);
    box-shadow: 0 2px 4px rgba(138, 160, 255, 0.3);
}

.dark-mode .sidebar-toggle:hover {
    box-shadow: 0 4px 8px rgba(138, 160, 255, 0.4);
}

.dark-mode .content-card {
    background: rgba(52, 73, 94, 0.95);
    color: #ecf0f1;
}

.dark-mode .card {
    background: #34495e;
    border-color: #4a6741;
}

.dark-mode .table {
    background: #34495e;
    color: #ecf0f1;
}

.dark-mode .table th {
    background: #2c3e50;
    color: #ecf0f1;
}

.dark-mode .form-group input,
.dark-mode .form-group select {
    background: #2c3e50;
    border-color: #4a6741;
    color: #ecf0f1;
}

.dark-mode .modal-content {
    background: #34495e;
    color: #ecf0f1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .task-config {
        grid-template-columns: 1fr;
    }
    
    .task-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .security-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .task-actions {
        white-space: normal;
    }
}
/* 在现有CSS文件末尾添加以下样式 */

/* 大型模态框 */
.large-modal {
    width: 95%;
    max-width: 1200px;
    margin: 2% auto;
    max-height: 95vh;
}

/* 头部按钮组 */
.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .header-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .header-buttons .btn {
        width: 100%;
    }
}

/* 任务表单区域 */
.task-form-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.task-form-section h4 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 标签页样式 */
.task-config-tabs {
    margin-bottom: 20px;
}

.tab-headers {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
}

.tab-header {
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-header:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-header.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-content {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tab-content.active {
    display: block;
}

/* 表单文本说明 */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* 必填字段标识 */
.required {
    color: #dc3545;
    font-weight: bold;
}

/* 价格范围预览 */
.price-range-preview {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

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

.range-info span:first-child {
    font-weight: 500;
    color: #1976d2;
}

/* 任务预览 */
.task-preview {
    margin-top: 20px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #b3d9ff;
}

.task-preview h4 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 16px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.preview-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e3f2fd;
}

.preview-section h5 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 14px;
    border-bottom: 1px solid #e3f2fd;
    padding-bottom: 5px;
}

.preview-item {
    margin-bottom: 8px;
    font-size: 13px;
}

.preview-item strong {
    color: #495057;
    min-width: 100px;
    display: inline-block;
}

/* 模态框底部 */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* 任务名称显示 */
.task-name {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.task-id {
    color: #6c757d;
    font-family: monospace;
    font-size: 11px;
}

/* 徽章样式 */
.symbol-badge {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-running {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-stopped {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auto-trading-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.auto-trading-badge.enabled {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.auto-trading-badge.disabled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-width: auto;
}

/* 统计数值样式 */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* 日志控制栏 */
.log-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* 日志级别样式 */
.log-error {
    color: #dc3545;
    font-weight: 600;
}

.log-warning {
    color: #ffc107;
    font-weight: 500;
}

.log-info {
    color: #28a745;
}

.log-success {
    color: #28a745;
    font-weight: 600;
}

/* 按钮图标 */
.btn svg {
    vertical-align: middle;
}

/* 代码样式 */
code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #495057;
    border: 1px solid #e9ecef;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .large-modal {
        width: 98%;
        margin: 1% auto;
    }
    
    .tab-headers {
        justify-content: flex-start;
    }
    
    .tab-header {
        font-size: 12px;
        padding: 10px 15px;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 3px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .range-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* 深色模式适配 */
.dark-mode .task-form-section {
    background: #2c3e50;
    border-color: #4a6741;
}

.dark-mode .tab-header {
    background: #2c3e50;
    color: #ecf0f1;
}

.dark-mode .tab-header:hover {
    background: #34495e;
}

.dark-mode .tab-content {
    background: #34495e;
    border-color: #4a6741;
    color: #ecf0f1;
}

.dark-mode .task-preview {
    background: #2c3e50;
    border-color: #4a6741;
}

.dark-mode .preview-section {
    background: #34495e;
    border-color: #4a6741;
}

.dark-mode .price-range-preview {
    background: #2c3e50;
    border-color: #667eea;
}

.dark-mode code {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a6741;
}

/* 下拉选择器美化 */
select,
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: linear-gradient(45deg, transparent 50%, #667eea 50%),
                      linear-gradient(135deg, #667eea 50%, transparent 50%),
                      linear-gradient(to right, #e9ecef, #e9ecef);
    background-position: calc(100% - 18px) calc(50% - 3px),
                         calc(100% - 12px) calc(50% - 3px),
                         calc(100% - 40px) 50%;
    background-size: 6px 6px,
                     6px 6px,
                     1px 60%;
    background-repeat: no-repeat;
    padding-right: 48px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}

select:hover,
.filter-select:hover {
    border-color: #cfd4da;
}

select:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* 禁用状态 */
select:disabled,
.filter-select:disabled {
    background-color: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
}

/* 小尺寸下拉（用于工具栏） */
.filter-select {
    padding: 8px 12px;
    min-width: 140px;
}

/* 深色模式适配 */
.dark-mode select,
.dark-mode .filter-select {
    background-color: #2c3e50;
    color: #ecf0f1;
    border-color: #4a6741;
    background-image: linear-gradient(45deg, transparent 50%, #8aa0ff 50%),
                      linear-gradient(135deg, #8aa0ff 50%, transparent 50%),
                      linear-gradient(to right, #4a6741, #4a6741);
}

.dark-mode select:focus,
.dark-mode .filter-select:focus {
    border-color: #8aa0ff;
    box-shadow: 0 0 0 3px rgba(138, 160, 255, 0.2);
}

/* 与表单统一的高度与字体 */
select,
.filter-select {
    font-size: 14px;
    line-height: 1.3;
}

/* 复选框组样式 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    width: 100%;
    justify-content: center;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 500;
}

/* 深色模式复选框样式 */
.dark-mode .checkbox-label {
    background: #2c3e50;
    border-color: #4a6741;
    color: #ecf0f1;
}

/* 表单两列布局 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

.dark-mode .checkbox-label:hover {
    background: #34495e;
    border-color: #5a7a51;
}

.dark-mode .checkbox-label input[type="checkbox"] {
    accent-color: #8aa0ff;
}

/* 一键拉砸功能样式 */
.top-layout {
    display: flex;
    gap: 15px;
    margin: 8px 0;
    align-items: flex-start;
}

.bottom-layout {
    margin: 15px 0;
}

.direction-section {
    flex: 1;
    min-width: 100px;
}

.direction-section h4,
.market-section h4,
.log-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    text-align: center;
    padding-bottom: 3px;
    border-bottom: 1px solid #e9ecef;
}

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

.direction-option {
    width: 100%;
}

.direction-option input[type="radio"] {
    display: none;
}

.direction-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 36px;
    gap: 6px;
    width: 100%;
}

.direction-label:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.direction-option input[type="radio"]:checked + .direction-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.direction-icon {
    font-size: 16px;
}

.direction-text {
    font-size: 12px;
    font-weight: 600;
}

.market-section {
    flex: 3;
}

.log-section {
    width: 100%;
}

.log-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.log-item {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 12px;
    color: #495057;
}

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

.direction-label.pump {
    border-color: #27ae60;
}

.direction-label.pump:hover {
    border-color: #27ae60;
    background: #d5f4e6;
}

.direction-option input[type="radio"]:checked + .direction-label.pump {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.direction-label.dump {
    border-color: #e74c3c;
}

.direction-label.dump:hover {
    border-color: #e74c3c;
    background: #fdeaea;
}

.direction-option input[type="radio"]:checked + .direction-label.dump {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* 市场数据显示 */
.market-data {
    margin-top: 0;
}

.market-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    min-height: 80px;
}

.market-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4px 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 13px;
    text-align: center;
}

.market-item .label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
    font-size: 12px;
}

.market-item .value {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.market-item .value.buy-price {
    color: #27ae60;
}

.market-item .value.sell-price {
    color: #e74c3c;
}

/* 价格设置区域 */
.price-settings {
    padding: 20px 0;
}

.price-settings .form-group input[readonly] {
    background: #f8f9fa;
    color: #495057;
    cursor: not-allowed;
}

/* 价格设置和操作按钮紧凑布局 */
.price-action-row {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.price-inputs {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 200px;
}

.price-inputs .form-group.compact {
    flex: 0 0 120px;
    margin-bottom: 0;
}

.price-inputs .form-group.compact label {
    font-size: 14px;
    margin-bottom: 4px;
}

.price-inputs .form-group.compact input {
    padding: 6px 8px;
    font-size: 14px;
    height: 32px;
}

.price-action-row .action-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.price-action-row .action-buttons .btn {
    padding: 6px 12px;
    font-size: 14px;
    min-width: auto;
    height: 32px;
}

@media (max-width: 768px) {
    .price-action-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .price-inputs {
        min-width: auto;
        justify-content: center;
    }
    
    .price-inputs .form-group.compact {
        flex: 0 0 100px;
    }
    
    .price-action-row .action-buttons {
        justify-content: center;
    }
}

/* 状态指示器样式 */
.status-indicator {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-loading {
    background: #f39c12;
    color: white;
    animation: pulse 1.5s infinite;
}

.status-success {
    background: #27ae60;
    color: white;
}

.status-error {
    background: #e74c3c;
    color: white;
}

.status-warning {
    background: #f39c12;
    color: white;
}

/* 消息提示样式 */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.message-error {
    background: #fdeaea;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.message-warning {
    background: #fef5e7;
    color: #f39c12;
    border: 1px solid #f39c12;
}

.message-info {
    background: #e3f2fd;
    color: #3498db;
    border: 1px solid #3498db;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* 表格状态样式 */
.buy-side {
    color: #27ae60 !important;
    font-weight: 600;
}

.sell-side {
    color: #e74c3c !important;
    font-weight: 600;
}

.status-pending {
    color: #f39c12;
    font-weight: 600;
}

.status-success {
    color: #27ae60;
    font-weight: 600;
}

.status-failed {
    color: #e74c3c;
    font-weight: 600;
}

.status-cancelled {
    color: #95a5a6;
    font-weight: 600;
}

.status-unknown {
    color: #7f8c8d;
    font-weight: 600;
}

/* 深色模式适配 */
.dark-mode .direction-label {
    background: #2c3e50;
    border-color: #4a6741;
    color: #ecf0f1;
}

.dark-mode .direction-label:hover {
    background: #34495e;
    border-color: #5a7a51;
}

.dark-mode .market-info {
    background: #2c3e50;
    border-color: #4a6741;
}

.dark-mode .market-item {
    background: #34495e;
    border-color: #4a6741;
    color: #ecf0f1;
}

.dark-mode .market-item .label {
    color: #ecf0f1;
}

.dark-mode .market-item .value {
    color: #ecf0f1;
}

.dark-mode .price-settings .form-group input[readonly] {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a6741;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-layout {
        flex-direction: column;
        gap: 10px;
    }
    
    .direction-section {
        min-width: auto;
        width: 100%;
    }
    
    .market-section {
        width: 100%;
    }
    
    .direction-selector {
        flex-direction: row;
        gap: 8px;
    }
    
    .direction-label {
        padding: 6px 8px;
        min-height: 32px;
        gap: 4px;
    }
    
    .direction-icon {
        font-size: 14px;
    }
    
    .direction-text {
        font-size: 11px;
    }
    
    .market-info {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(2, 1fr);
        gap: 4px;
        padding: 6px;
        min-height: 70px;
    }
    
    .market-item {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .market-item .value {
        font-size: 10px;
    }
    
    .log-content {
        min-height: 150px;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .top-layout {
        gap: 8px;
    }
    
    .direction-selector {
        gap: 6px;
    }
    
    .direction-label {
        padding: 5px 6px;
        min-height: 30px;
        gap: 3px;
    }
    
    .direction-icon {
        font-size: 12px;
    }
    
    .direction-text {
        font-size: 10px;
    }
    
    .market-info {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 3px;
        padding: 4px;
        min-height: auto;
    }
    
    .market-item {
        padding: 3px 5px;
        font-size: 10px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .market-item .value {
        font-size: 9px;
    }
    
    .log-content {
        min-height: 120px;
        max-height: 200px;
    }
}

/* 余额卡片样式 */
.balance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.balance-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.balance-header h3 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.balance-time {
    color: #7f8c8d;
    font-size: 11px;
}

.balance-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.balance-item.main {
    grid-column: 1 / -1;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

.balance-item .label {
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
}

.balance-item .value {
    color: #2c3e50;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.balance-item.main .value {
    font-size: 16px;
    color: #27ae60;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* 深色模式余额卡片 */
.dark-mode .balance-card {
    background: #2c3e50;
    border-color: #4a6741;
}

.dark-mode .balance-header {
    border-bottom-color: #34495e;
}

.dark-mode .balance-header h3 {
    color: #ecf0f1;
}

.dark-mode .balance-time {
    color: #bdc3c7;
}

.dark-mode .balance-item .label {
    color: #bdc3c7;
}

.dark-mode .balance-item .value {
    color: #ecf0f1;
}

.dark-mode .balance-item.main .value {
    color: #27ae60;
}

.dark-mode .no-data {
    background: #34495e;
    color: #bdc3c7;
    border-color: #4a6741;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pump-dump-controls {
        grid-template-columns: 1fr;
    }
    
    .balance-cards {
        grid-template-columns: 1fr;
    }
    
    .balance-content {
        grid-template-columns: 1fr;
    }
    
    .emergency-stop {
        bottom: 20px;
        right: 20px;
    }
    
    .emergency-btn {
        padding: 12px 20px !important;
        font-size: 12px !important;
    }
}

/* 拉砸按钮禁用状态样式 */
.btn-disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.65 !important;
}

.btn-disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
}

/* 表单中的复选框样式 */
.form-group .checkbox-label {
    width: auto;
    justify-content: flex-start;
    margin-bottom: 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-group .checkbox-label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.form-group .checkbox-label input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 500;
}

/* 持仓信息样式 */
.position-info {
    padding: 20px;
}

.position-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.position-header h4 {
    color: #495057;
    margin-bottom: 5px;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.position-card {
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.position-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.position-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.position-card-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.position-card-body {
    padding: 20px;
}

.position-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.position-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 14px;
}

.position-value {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

/* 持仓信息响应式设计 */
@media (max-width: 992px) {
    .position-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .position-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}