.wallet-home {
    --wallet-income: #13a855;
    --wallet-income-soft: rgba(19, 168, 85, 0.11);
    --wallet-expense: #f05f78;
    --wallet-expense-soft: rgba(240, 95, 120, 0.11);
    display: grid;
    gap: 14px;
    padding-bottom: 32px;
}

.wallet-home__summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 12px 6px;
    text-align: center;
}

.wallet-home__eyebrow,
.wallet-home__month,
.wallet-home__section-kicker {
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.wallet-home__net {
    margin-top: 5px;
    color: var(--text-0);
    font-size: clamp(34px, 10vw, 48px);
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.wallet-home__net.is-negative { color: var(--wallet-expense); }
.wallet-home__month { margin-top: 8px; font-size: 10px; }

.wallet-home__balance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-1);
}

.wallet-balance { min-width: 0; padding: 18px 14px 14px; }
.wallet-balance + .wallet-balance { border-left: 1px solid var(--border); }
.wallet-balance--income { background: var(--wallet-income-soft); }
.wallet-balance--expense { background: var(--wallet-expense-soft); }

.wallet-balance__label {
    display: block;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
}

.wallet-balance__amount {
    display: block;
    margin: 9px 0 18px;
    overflow-wrap: anywhere;
    color: var(--text-0);
    font-size: clamp(20px, 6vw, 30px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.wallet-balance--income .wallet-balance__amount { color: var(--wallet-income); }
.wallet-balance--expense .wallet-balance__amount { color: var(--wallet-expense); }

.wallet-balance__action {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 9px 10px;
    border: 0;
    border-radius: 12px;
    background: var(--wallet-income);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.wallet-balance--expense .wallet-balance__action { background: var(--wallet-expense); }

.wallet-home__capture {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.wallet-capture {
    display: flex;
    min-width: 0;
    min-height: 70px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-1);
    color: var(--text-1);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.wallet-capture:hover,
.wallet-capture:focus-visible { border-color: var(--accent); color: var(--accent); }

.wallet-home__secondary {
    margin-top: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-1);
}

.wallet-home__section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.wallet-home__section-head h2 { margin: 4px 0 0; color: var(--text-0); font-size: 16px; }

.wallet-home__section-head button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.wallet-week {
    height: 108px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.wallet-week__day { display: grid; grid-template-rows: 1fr auto; gap: 7px; min-width: 0; }

.wallet-week__track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(127, 127, 127, .08);
}

.wallet-week__track span {
    width: 55%;
    min-height: 4px;
    border-radius: 6px 6px 2px 2px;
    background: var(--wallet-expense);
    opacity: .9;
}

.wallet-week__label {
    overflow: hidden;
    color: var(--text-3);
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    text-overflow: clip;
    text-transform: uppercase;
}

.wallet-home__obligations { padding: 0; overflow: hidden; }

.wallet-home__error {
    padding: 18px;
    border: 1px solid rgba(240, 95, 120, .35);
    border-radius: 16px;
    background: var(--wallet-expense-soft);
    color: var(--text-1);
    text-align: center;
}

.wallet-home__retry {
    min-height: 40px;
    padding: 8px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #050506;
    font: inherit;
    font-weight: 800;
}

@media (min-width: 760px) {
    .wallet-home { max-width: 760px; margin-inline: auto; gap: 18px; }
    .wallet-balance { padding: 24px; }
    .wallet-home__capture { gap: 12px; }
    .wallet-capture { min-height: 82px; }
}

@media (max-width: 360px) {
    .wallet-balance { padding-inline: 10px; }
    .wallet-balance__action { font-size: 11px; }
    .wallet-capture span:last-child { font-size: 10px; }
}
