/* ================================================================
   Portfolio Overview
   ================================================================ */

.overview-header {
    margin-bottom: 1.5rem;
}

.overview-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.overview-back-link:hover { color: var(--fg); }

.overview-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.overview-subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 0.125rem;
}

/* KPI grid */
.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.overview-kpi-card {
    background: var(--surface);
    padding: 20px;
}

.overview-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.overview-kpi-value--positive { color: var(--positive, #16a34a); }
.overview-kpi-value--negative { color: var(--negative, #dc2626); }

.overview-kpi-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.125rem;
}

/* Sections */
.overview-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 20px;
    margin-bottom: 1.5rem;
}

.overview-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* Debt summary grid */
.overview-debt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1.5rem;
}

.overview-debt-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.overview-debt-label {
    font-size: 0.75rem;
    color: var(--muted);
}

.overview-debt-value {
    font-size: 1.125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Breakdown row */
.overview-breakdown-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.overview-breakdown {
    margin-bottom: 0;
}

.overview-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overview-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.overview-bar-label {
    font-size: 0.8125rem;
    font-weight: 500;
}

.overview-bar-count {
    font-size: 0.75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.overview-bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.overview-bar-fill {
    height: 100%;
    background: var(--fg);
    border-radius: 3px;
    min-width: 4px;
    transition: width 0.3s ease;
}

/* Property table */
.overview-table-wrap {
    overflow-x: auto;
    margin: 0 -20px -20px;
    padding: 0 20px 20px;
}

.overview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.overview-table th {
    position: sticky;
    top: 0;
    padding: 0.5rem 0.75rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}

.overview-table th:first-child { text-align: left; }

.overview-table th[data-sort] { cursor: pointer; }
.overview-table th[data-sort]:hover { color: var(--fg); }

.overview-table th.sort-asc::after { content: " \2191"; }
.overview-table th.sort-desc::after { content: " \2193"; }

.overview-table td {
    padding: 0.5rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.overview-table td:first-child { text-align: left; }

.overview-table-name a {
    color: var(--fg);
    text-decoration: none;
    font-weight: 500;
}
.overview-table-name a:hover { text-decoration: underline; }

.overview-table tbody tr:hover {
    background: var(--hover-overlay);
}

.overview-best {
    font-weight: 700;
    color: var(--positive, #16a34a);
}

/* Portfolio overview link in dashboard */
.portfolio-overview-link {
    font-size: 0.8125rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}
.portfolio-overview-link:hover {
    color: var(--fg);
    text-decoration: underline;
}

