/* ---- Cash Flow Calendar ---- */

.cashflow-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.cashflow-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cashflow-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.cashflow-kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.cashflow-kpi-value--positive {
    color: #16a34a;
}

.cashflow-kpi-value--negative {
    color: #dc2626;
}

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

.cashflow-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.cashflow-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.cashflow-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.cashflow-table th,
.cashflow-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.cashflow-table th {
    background: var(--surface);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cashflow-property-header {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--surface);
    min-width: 160px;
}

.cashflow-month-header {
    text-align: right;
    min-width: 80px;
}

.cashflow-month-header--annual {
    border-left: 2px solid var(--border);
}

.cashflow-property-name {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashflow-property-name a {
    color: var(--fg);
    text-decoration: none;
}

.cashflow-property-name a:hover {
    text-decoration: underline;
}

.cashflow-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cashflow-cell--positive {
    background: rgba(22, 163, 74, 0.08);
    color: #16a34a;
}

.cashflow-cell--negative {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.cashflow-cell--total {
    font-weight: 700;
}

.cashflow-cell--grand-total {
    border-left: 2px solid var(--border);
}

.cashflow-table tfoot td {
    border-top: 2px solid var(--border);
    border-bottom: none;
}

