/* ---------------------------------------------------------
   Portfolio Dashboard — global styling
   Dash auto-loads everything in /assets, no wiring needed.
--------------------------------------------------------- */

:root {
    --bg-page: #f9f9f9;
    --bg-panel: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #6c757d;
    --text-faint: #9aa5b1;
    --border-color: #ececec;
    --gridline: #eceef1;
    --accent: #2B60FF;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body,
.dash-table-container,
.dash-spreadsheet-container {
    font-family: 'Manrope', sans-serif;
}

/* ---------- Page shell ---------- */
.dashboard-container {
    background-color: var(--bg-page);
    min-height: 100vh;
    padding: 40px;
}

.dashboard-header {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: clamp(26px, 3.2vw, 34px);
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-top: 14px;
    margin-bottom: 6px;
}

.dashboard-subtitle {
    font-family: 'Manrope', sans-serif;
    color: var(--text-muted);
    font-size: 14.5px;
    letter-spacing: -0.01em;
}

/* ---------- Section panels (Holdings / Performance / Regression / Rolling Beta) ---------- */
.panel {
    background-color: var(--bg-panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
    background-clip: padding-box;
}

.panel h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin: 0 0 16px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gridline);
}

/* ---------- Segmented toggle controls (RadioItems) ---------- */
.toggle-group {
    display: inline-flex;
    background-color: #f1f2f4;
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}

.toggle-group label {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.toggle-group input[type="radio"] {
    /* keep accessible, hide the native dot */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-group label:has(input:checked) {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(43, 96, 255, 0.35);
}

.toggle-group label:hover {
    color: var(--text-main);
}

/* ---------- Metric pills (Beta / Alpha / R²) ---------- */
.metric-card {
    border-radius: 12px;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.metric-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.metric-card-value {
    color: var(--text-main);
}

/* ---------- Data table polish ---------- */
.dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-spreadsheet-container .dash-spreadsheet-inner th {
    font-family: 'Manrope', sans-serif;
}

.dash-spreadsheet-container tr:hover td {
    background-color: #eef0f3 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .dashboard-container {
        padding: 16px;
    }

    .panel {
        margin: 0 0 16px 0;
    }
}
