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

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

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

/* Header */
header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

h1 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

select, input[type="text"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

select {
    min-width: 150px;
}

input[type="text"] {
    flex: 1;
    max-width: 400px;
}

/* Metrics Cards */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.metric-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
}

.metric-change {
    font-size: 14px;
    margin-top: 5px;
}

.metric-change.up {
    color: #22c55e;
}

.metric-change.down {
    color: #ef4444;
}

/* Tabs */
.tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #f3f4f6;
}

.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: white;
}

.tab-content {
    padding: 25px;
}

.tab-panel {
    display: none;
}

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

/* Chart */
.chart-container {
    margin-bottom: 25px;
    min-height: 400px;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f9fafb;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

tr:hover {
    background: #f9fafb;
}

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

.fund-link {
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
}

.fund-link:hover {
    text-decoration: underline;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
    color: #6b7280;
    font-size: 16px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
