main {
    padding: 0 24px 40px;
}

/* ── Stat cards ── */
.stats {
    display: flex;
    gap: 16px;
    padding: 24px 0 28px;
    flex-wrap: wrap;
}

.stats-card {
    flex: 1;
    min-width: 160px;
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(0,0,0,0.06);
}

.balance-card { background: #fff9e6; }
.income-card  { background: #e8f5e9; }
.expense-card { background: #fdecea; }

.card-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.stats-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.stats-amount {
    font-size: 1.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #111;
}

.stats-amount.negative { color: #c62828; }

/* ── Recent transactions ── */
.recent-section {
    background: #c8c9c2;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
}

.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.recent-header p {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
    margin: 0;
}

.view-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a8a5e;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.view-all:hover { text-decoration: underline; }

/* ── Table ── */
.recent-transactions-table { padding: 0; }

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

thead tr { border-bottom: 1px solid rgba(0,0,0,0.08); }

th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 12px 16px;
    color: #222;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.95rem;
}

tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-income  { background: #c8e6c9; color: #1b5e20; }
.badge-expense { background: #FAECE7; color: #b71c1c; }

/* ── Amounts ── */
.amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-income  { color: #2e7d32; }
.amount-expense { color: #c62828; }
