/* Trading Dashboard Styling */

.trading-dashboard-wrap {
    max-width: 1400px;
    margin: 20px auto;
}

.trading-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.trading-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
}

.trading-header .subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Stats Grid */
.trading-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-card.positive {
    border-left-color: #00cc44;
}

.stat-card.negative {
    border-left-color: #ff4444;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.stat-card.positive .stat-value {
    color: #00cc44;
}

.stat-card.negative .stat-value {
    color: #ff4444;
}

/* Sections */
.trading-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.trading-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f3f7 100%);
    padding: 20px 25px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.status-indicator {
    font-size: 20px;
    color: #00cc44;
    animation: pulse 2s infinite;
}

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

.section-content {
    padding: 25px;
    min-height: 100px;
}

/* Items */
.item {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: background 0.2s;
}

.item:last-child {
    margin-bottom: 0;
}

.item:hover {
    background: #f5f5f5;
}

.item.up {
    border-left-color: #00cc44;
}

.item.down {
    border-left-color: #ff4444;
}

.item strong {
    color: #333;
    font-weight: 600;
}

.item-symbol {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}

.item-up .item-symbol {
    background: #00cc44;
}

.item-down .item-symbol {
    background: #ff4444;
}

.item-value {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}

.item-value strong {
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    margin: 10px 0;
    font-size: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    text-align: center;
}

.stat-item .stat-label {
    margin-bottom: 12px;
}

.stat-big {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.stat-big.positive {
    color: #00cc44;
}

.stat-big.negative {
    color: #ff4444;
}

/* Logs */
.log-item {
    background: #f9f9f9;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #666;
}

.log-item.success {
    border-left-color: #00cc44;
    background: rgba(0, 204, 68, 0.05);
}

.log-item.error {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
}

.log-item.info {
    border-left-color: #667eea;
}

.log-time {
    color: #999;
    font-weight: bold;
}

/* Footer */
.trading-footer {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.trading-footer p {
    margin: 8px 0;
}

.trading-footer code {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #333;
    border: 1px solid #ddd;
}

.trading-footer .button {
    margin-left: 10px;
}

/* Loading */
.loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Settings Form */
.settings-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.testing-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.testing-section h2 {
    margin-top: 0;
}

#test-result {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    background: #f0f4ff;
}

#test-result p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .trading-header {
        padding: 20px;
    }
    
    .trading-header h1 {
        font-size: 24px;
    }
    
    .trading-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .trading-header {
        padding: 15px;
    }
    
    .trading-header h1 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .item {
        padding: 12px;
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-big {
        font-size: 22px;
    }
}
