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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    color: white !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    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 16px rgba(0, 0, 0, 0.12);
}

.stat-card.primary {
    border-left: 4px solid #667eea;
}

.stat-card.success {
    border-left: 4px solid #2ecc71;
}

.stat-card.warning {
    border-left: 4px solid #f39c12;
}

.stat-card.danger {
    border-left: 4px solid #e74c3c;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-value.positive {
    color: #2ecc71;
}

.stat-value.negative {
    color: #e74c3c;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

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

.card-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 0;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #7f8c8d;
    padding: 12px 16px;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

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

.badge-trade {
    background-color: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-open {
    background-color: #2ecc71;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-close {
    background-color: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-buy {
    background-color: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-sell {
    background-color: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.chart-container {
    padding: 20px;
    height: 300px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

.position-table {
    max-height: 400px;
    overflow-y: auto;
}

.message-list {
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

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

.message-time {
    font-size: 12px;
    color: #7f8c8d;
}

.message-content {
    font-size: 14px;
    margin-top: 4px;
}

.source-tag {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.profit-positive {
    color: #2ecc71;
    font-weight: 600;
}

.profit-negative {
    color: #e74c3c;
    font-weight: 600;
}

.refresh-btn {
    background: #667eea;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #5a6fd6;
}
