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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
}

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

header {
    background: linear-gradient(135deg, #1a472a 0%, #2d6a4f 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.header-actions button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.header-actions button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.kpi-icon {
    font-size: 32px;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    margin-top: 4px;
}

.kpi-card.total-value .kpi-value { color: #2d6a4f; }
.kpi-card.total-cost .kpi-value { color: #1a472a; }
.kpi-card.gain-loss .kpi-value { 
    color: #2d6a4f; 
}
.kpi-card.gain-loss .kpi-value.negative { color: #e74c3c; }
.kpi-card.return .kpi-value { color: #2d6a4f; }
.kpi-card.return .kpi-value.negative { color: #e74c3c; }
.kpi-card.holdings .kpi-value { color: #3498db; }
.kpi-card.daily .kpi-value { color: #f39c12; }

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.chart-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.chart-card canvas {
    max-height: 300px;
}

/* Performers */
.performers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.performer-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.performer-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.performer-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

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

.performer-item .symbol {
    font-weight: 600;
    color: #2c3e50;
}

.performer-item .return {
    font-weight: 600;
}

.performer-item .return.positive { color: #27ae60; }
.performer-item .return.negative { color: #e74c3c; }

/* Table */
.table-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.table-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.table-controls input,
.table-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    flex: 1;
    min-width: 150px;
}

.table-controls input:focus,
.table-controls select:focus {
    outline: none;
    border-color: #2d6a4f;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    background: #f8f9fa;
    color: #2c3e50;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    white-space: nowrap;
}

th:hover {
    background: #e9ecef;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f5;
}

tr:hover {
    background: #f8f9fa;
}

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

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

.sector-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
}

.type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.type-badge.Stock { background: #dbeafe; color: #1e40af; }
.type-badge.ETF { background: #d1fae5; color: #065f46; }
.type-badge.Crypto { background: #fef3c7; color: #92400e; }
.type-badge.Bond { background: #f3e8ff; color: #6b21a8; }

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .performers-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-value {
        font-size: 20px;
    }
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}