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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    color: #333;
    font-size: 24px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc3545;
}

.status-dot.connected {
    background: #28a745;
    animation: pulse 2s infinite;
}

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

#statusText {
    font-size: 14px;
    color: #666;
}

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

.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 16px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.card h3 {
    color: #555;
    font-size: 16px;
    margin: 16px 0 12px 0;
}

.pair-selector {
    display: flex;
    gap: 10px;
}

.select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.pair-info {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

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

.info-row .value {
    font-family: monospace;
    color: #333;
    font-size: 12px;
}

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

.price-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.price-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.price-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 流动性值使用较小字体以便完整显示 */
#liquidity {
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.swap-form {
    display: grid;
    gap: 16px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.input:focus {
    outline: none;
    border-color: #667eea;
}

.quote-result {
    margin-top: 20px;
    padding: 16px;
    background: #f0f4ff;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

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

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.result-item .label {
    font-size: 13px;
    color: #666;
}

.result-item .value {
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.warning {
    margin-top: 12px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 13px;
}

.logs {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
}

.log-entry {
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.log-time {
    color: #6c757d;
    margin-right: 8px;
}

.log-message {
    color: #333;
}

.hidden {
    display: none !important;
}

/* Tab 导航样式 */
.tabs {
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f0f4ff;
    color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

/* Tab 内容样式 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* 表单样式 */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* 管理页面样式 */
.manage-toolbar {
    margin-bottom: 16px;
}

.pair-manage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pair-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.pair-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.pair-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pair-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pair-item-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.pair-item-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
}

.pair-item-detail {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.pair-item-detail .label {
    color: #666;
}

.pair-item-detail .value {
    font-family: monospace;
    color: #333;
    font-size: 12px;
}

.pair-item-alias {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.pair-item-alias .label {
    color: #666;
    font-size: 12px;
}

.pair-item-alias .value {
    color: #667eea;
    font-weight: 500;
    font-size: 14px;
}

.alias-edit-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.alias-edit-form input {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.alias-edit-form input:focus {
    outline: none;
    border-color: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }

    .tab-content.active {
        grid-template-columns: 1fr;
    }

    .price-display {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

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

    .pair-item-details {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
    }
}

/* Token 切换按钮样式 */
.swap-switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -12px 0;
    position: relative;
    height: 0;
    z-index: 1;
}

.swap-switch-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #667eea;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.swap-switch-btn:hover {
    background: #667eea;
    color: white;
    transform: rotate(180deg) scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.swap-switch-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.swap-switch-btn svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* 链徽章样式 */
.chain-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    color: white;
    vertical-align: middle;
}

.chain-badge.chain-1 {
    background: linear-gradient(135deg, #627EEA 0%, #4E5FD1 100%);
}

.chain-badge.chain-56 {
    background: linear-gradient(135deg, #F3BA2F 0%, #E5A524 100%);
}

.chain-badge.chain-137 {
    background: linear-gradient(135deg, #8247E5 0%, #6B39C6 100%);
}

/* ==================== Token映射页面样式 ==================== */

.mapping-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mapping-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.mapping-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.mapping-symbol {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.mapping-name {
    font-size: 14px;
    color: #666;
}

.stable-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.mapping-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chain-token-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    font-size: 13px;
}

.chain-token-item .chain-name {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
}

.chain-token-item .token-address {
    font-family: monospace;
    color: #333;
}

.chain-token-item .token-decimals {
    color: #999;
    font-size: 12px;
}

.chain-token-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.form-inline {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 15px;
}

/* ==================== 套利监控页面样式 ==================== */

.arbitrage-controls {
    margin-bottom: 16px;
}

.path-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.path-item.disabled {
    opacity: 0.6;
    border-left-color: #999;
}

.path-item:hover {
    transform: translateX(4px);
}

.path-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.path-item-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
}

.path-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.path-status.enabled {
    background: #28a745;
    color: white;
}

.path-status.disabled {
    background: #999;
    color: white;
}

.path-item-details {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.path-item-details .label {
    font-weight: 500;
    color: #333;
}

.discovered-paths {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.discovered-path-item {
    padding: 16px;
    background: #e8f5e9;
    border-radius: 8px;
    border: 1px dashed #28a745;
}

.discovered-path-header {
    font-size: 16px;
    margin-bottom: 10px;
}

.discovered-path-details {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

/* 套利结果样式 */
.arbitrage-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arbitrage-result-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.arbitrage-result-item.profitable {
    border-left: 4px solid #28a745;
}

.arbitrage-result-item.not-profitable {
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.arb-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.arb-path-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.arb-profit {
    font-size: 18px;
    font-weight: 700;
}

.arb-profit.high-profit {
    color: #28a745;
}

.arb-profit.medium-profit {
    color: #ffc107;
}

.arb-profit.low-profit {
    color: #17a2b8;
}

.arb-result-details {
    font-size: 13px;
}

.arb-chain-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
}

.arb-source, .arb-dest {
    flex: 1;
}

.arb-source strong, .arb-dest strong {
    display: block;
    margin-bottom: 4px;
    color: #667eea;
}

.arb-arrow {
    font-size: 24px;
    color: #999;
}

.arb-amounts {
    display: flex;
    gap: 20px;
    color: #666;
}

/* 按钮主题样式 */
.btn-small.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-small.btn-primary:hover {
    opacity: 0.9;
}

.btn-small.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-small.btn-secondary:hover {
    background: #5a6268;
}

/* ==================== 钱包管理页面样式 ==================== */

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    transition: all 0.3s;
}

.wallet-item:hover {
    transform: translateX(4px);
}

.wallet-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wallet-item-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wallet-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.wallet-status.active {
    background: #28a745;
    color: white;
}

.wallet-status.inactive {
    background: #dc3545;
    color: white;
}

.wallet-item-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
}

.wallet-detail {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.wallet-detail .label {
    color: #666;
}

.wallet-detail .value {
    font-family: monospace;
    color: #333;
}

.wallet-balance {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-balance-value {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
}

/* 私钥状态徽章 */
.key-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

.key-badge.matched {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.key-badge.unmatched {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* 私钥状态信息卡片 */
.loaded-key-info {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.loaded-key-info.error {
    border-left-color: #f44336;
}

/* ==================== 跨链桥配置页面样式 ==================== */

.bridge-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bridge-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.bridge-item:hover {
    transform: translateX(4px);
}

.bridge-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bridge-item-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bridge-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.bridge-type-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bridge-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.bridge-status.active {
    background: #28a745;
    color: white;
}

.bridge-status.inactive {
    background: #dc3545;
    color: white;
}

.bridge-item-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
}

.bridge-route {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
}

.bridge-route-chain {
    flex: 1;
    text-align: center;
}

.bridge-route-chain .chain-name {
    font-weight: 600;
    color: #333;
}

.bridge-route-chain .chain-id {
    font-size: 12px;
    color: #666;
}

.bridge-route-arrow {
    font-size: 20px;
    color: #667eea;
}

.bridge-fee-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

/* 桥健康状态 */
.bridge-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.bridge-health-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.bridge-health-item.healthy {
    border: 2px solid #28a745;
}

.bridge-health-item.unhealthy {
    border: 2px solid #dc3545;
}

.bridge-health-name {
    font-weight: 600;
    margin-bottom: 8px;
}

.bridge-health-status {
    font-size: 14px;
}

.bridge-health-status.healthy {
    color: #28a745;
}

.bridge-health-status.unhealthy {
    color: #dc3545;
}

/* ==================== 套利执行页面样式 ==================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

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

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.stat-value.success {
    color: #28a745;
}

.stat-value.warning {
    color: #ffc107;
}

.stat-value.danger {
    color: #dc3545;
}

.execution-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.execution-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.execution-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.execution-item.status-pending {
    border-left: 4px solid #6c757d;
}

.execution-item.status-running {
    border-left: 4px solid #ffc107;
}

.execution-item.status-completed {
    border-left: 4px solid #28a745;
}

.execution-item.status-failed {
    border-left: 4px solid #dc3545;
}

.execution-item.status-cancelled {
    border-left: 4px solid #999;
}

.execution-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.execution-item-id {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.execution-status-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: white;
}

.execution-status-badge.pending {
    background: #6c757d;
}

.execution-status-badge.running {
    background: #ffc107;
    color: #333;
}

.execution-status-badge.completed {
    background: #28a745;
}

.execution-status-badge.failed {
    background: #dc3545;
}

.execution-status-badge.cancelled {
    background: #999;
}

.execution-item-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    font-size: 13px;
}

.execution-detail {
    display: flex;
    flex-direction: column;
}

.execution-detail .label {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

.execution-detail .value {
    font-weight: 500;
    color: #333;
}

.execution-item-step {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    font-size: 13px;
    color: #666;
}

.execution-item-step strong {
    color: #667eea;
}

/* 执行详情弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 执行状态 */
.exec-status {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 执行步骤 */
.exec-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.exec-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.exec-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.exec-step-icon.pending {
    background: #6c757d;
}

.exec-step-icon.running {
    background: #ffc107;
    color: #333;
    animation: pulse 1.5s infinite;
}

.exec-step-icon.completed {
    background: #28a745;
}

.exec-step-icon.failed {
    background: #dc3545;
}

.exec-step-info {
    flex: 1;
}

.exec-step-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.exec-step-detail {
    font-size: 12px;
    color: #666;
}

.exec-step-tx {
    font-family: monospace;
    font-size: 12px;
    color: #667eea;
}

/* 执行日志 */
.exec-logs {
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: #1e1e1e;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
}

.exec-log {
    padding: 4px 0;
    color: #d4d4d4;
}

.exec-log-time {
    color: #6a9955;
    margin-right: 8px;
}

.exec-log-level {
    font-weight: 600;
    margin-right: 8px;
}

.exec-log-level.info {
    color: #569cd6;
}

.exec-log-level.warn {
    color: #ce9178;
}

.exec-log-level.error {
    color: #f14c4c;
}

/* 危险按钮 */
.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* ==================== 自动执行配置样式 ==================== */

.auto-exec-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.auto-exec-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auto-exec-indicator .status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.auto-exec-indicator .status-badge.enabled {
    background: #28a745;
    color: white;
}

.auto-exec-indicator .status-badge.disabled {
    background: #6c757d;
    color: white;
}

.auto-exec-indicator .running-info {
    font-size: 13px;
    color: #666;
}

.auto-exec-actions {
    display: flex;
    gap: 8px;
}

.auto-config-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auto-config-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.auto-config-item:hover {
    transform: translateX(4px);
}

.auto-config-item.disabled {
    opacity: 0.6;
    border-left-color: #999;
}

.auto-config-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.auto-config-item-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-config-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.auto-config-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.auto-config-status.enabled {
    background: #28a745;
    color: white;
}

.auto-config-status.disabled {
    background: #999;
    color: white;
}

.auto-config-item-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    font-size: 13px;
}

.auto-config-detail {
    display: flex;
    flex-direction: column;
}

.auto-config-detail .label {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

.auto-config-detail .value {
    font-weight: 500;
    color: #333;
}

.auto-config-item-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .execution-item-details {
        grid-template-columns: 1fr;
    }

    .wallet-item-details,
    .bridge-item-details {
        grid-template-columns: 1fr;
    }

    .bridge-health-grid {
        grid-template-columns: 1fr;
    }

    .auto-exec-status {
        flex-direction: column;
        gap: 12px;
    }

    .auto-config-item-details {
        grid-template-columns: 1fr;
    }
}

/* ==================== 登录页面样式 ==================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

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

.login-header h1 {
    color: white;
    font-size: 22px;
    margin-bottom: 8px;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

.login-form {
    padding: 32px 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

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

.login-form .input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

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

.login-error {
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.btn-block:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Header 用户信息区域 */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

#currentUsername {
    font-weight: 500;
    color: #333;
}

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

/* 登录页面响应式 */
@media (max-width: 480px) {
    .login-header {
        padding: 24px 20px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .login-form {
        padding: 24px 20px;
    }
}

/* Header 响应式调整 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        gap: 12px;
    }

    .user-info {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 可复制地址样式 ==================== */

.copyable-address {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.copyable-address:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.copyable-address .address-text {
    color: #333;
}

.copyable-address .copy-icon {
    display: flex;
    align-items: center;
    color: #667eea;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.copyable-address:hover .copy-icon {
    opacity: 1;
}

.copyable-address .copy-success-icon {
    display: none;
    align-items: center;
    color: #28a745;
}

/* 复制成功状态 */
.copyable-address.copied {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
}

.copyable-address.copied .copy-icon {
    display: none;
}

.copyable-address.copied .copy-success-icon {
    display: flex;
    animation: copySuccess 0.3s ease;
}

.copyable-address.copied .address-text {
    color: #28a745;
}

@keyframes copySuccess {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 完整地址显示模式（不缩短） */
.copyable-address.full-address {
    font-size: 11px;
    word-break: break-all;
}

/* 在暗色背景上的样式 */
.loaded-key-info .copyable-address {
    background: rgba(255, 255, 255, 0.9);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .copyable-address {
        font-size: 11px;
        padding: 3px 6px;
    }
}
