.wallet-body {
    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(55, 193, 162, 0.13),
            transparent 28%
        ),
        radial-gradient(
            circle at 92% 10%,
            rgba(68, 123, 230, 0.12),
            transparent 25%
        ),
        #f3f6f5;
}

.wallet-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
}

.wallet-sidebar {
    height: 100vh;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    border-right: 1px solid rgba(19, 57, 48, 0.1);
    background: rgba(250, 252, 251, 0.86);
    backdrop-filter: blur(24px);
    z-index: 40;
}

.wallet-brand {
    padding: 0 10px 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            #139379,
            #11718b
        );
    box-shadow:
        0 12px 26px rgba(19, 124, 105, 0.25);
}

.wallet-brand-text strong,
.wallet-brand-text small {
    display: block;
}

.wallet-brand-text strong {
    font-size: 1.04rem;
}

.wallet-brand-text small {
    margin-top: 3px;
    color: var(--muted);
}

.wallet-navigation {
    display: grid;
    gap: 5px;
}

.wallet-navigation-link {
    min-height: 48px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #53615d;
    font-weight: 700;
    border-radius: 14px;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.wallet-navigation-link:hover {
    color: var(--primary-dark);
    background: rgba(19, 124, 105, 0.07);
    transform: translateX(2px);
}

.wallet-navigation-link.is-active {
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #137c69,
            #168a97
        );
    box-shadow:
        0 12px 24px rgba(19, 124, 105, 0.2);
}

.wallet-navigation-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(19, 124, 105, 0.08);
}

.wallet-navigation-link.is-active .wallet-navigation-icon {
    background: rgba(255, 255, 255, 0.17);
}

.wallet-sidebar-footer {
    margin-top: auto;
}

.wallet-demo-card {
    padding: 18px;
    border: 1px solid rgba(19, 124, 105, 0.13);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(224, 244, 238, 0.88),
            rgba(236, 243, 255, 0.88)
        );
}

.wallet-demo-card strong {
    display: block;
    margin-bottom: 6px;
}

.wallet-demo-card p {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.button-full {
    width: 100%;
}

.wallet-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wallet-topbar {
    min-height: 84px;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(19, 57, 48, 0.09);
    background: rgba(243, 246, 245, 0.82);
    backdrop-filter: blur(20px);
}

.wallet-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.wallet-topbar-title {
    display: flex;
    flex-direction: column;
}

.wallet-topbar-title span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.wallet-topbar-title strong {
    font-size: 1.12rem;
}

.wallet-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-mode-badge {
    padding: 8px 12px;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid rgba(19, 124, 105, 0.15);
    border-radius: 999px;
    background: var(--primary-soft);
}

.wallet-user-button {
    padding: 6px 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
}

.wallet-user-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            #137c69,
            #407bc5
        );
}

.wallet-user-text strong,
.wallet-user-text small {
    display: block;
}

.wallet-user-text strong {
    font-size: 0.86rem;
}

.wallet-user-text small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
}

.wallet-demo-banner {
    margin: 24px 32px 0;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(19, 124, 105, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(224, 244, 238, 0.96),
            rgba(237, 243, 255, 0.96)
        );
}

.wallet-demo-banner strong {
    display: block;
    margin-bottom: 4px;
}

.wallet-demo-banner p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.wallet-content {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 34px 32px 60px;
}

.wallet-page-heading {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.wallet-page-heading h1 {
    margin-bottom: 12px;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.wallet-page-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.wallet-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none !important;
}

.wallet-summary-grid {
    margin-bottom: 22px;
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
    gap: 16px;
}

.wallet-summary-card {
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.83);
    box-shadow:
        0 12px 34px rgba(27, 65, 57, 0.055);
}

.wallet-summary-card-header {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-weight: 700;
}

.wallet-summary-card > strong {
    display: block;
    margin-bottom: 9px;
    font-size: clamp(1.65rem, 2.7vw, 2.45rem);
    letter-spacing: -0.045em;
}

.wallet-summary-card small {
    color: var(--muted);
    line-height: 1.4;
}

.wallet-summary-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-weight: 900;
    border-radius: 12px;
}

.wallet-summary-icon.income {
    color: #0f7b56;
    background: rgba(19, 159, 105, 0.12);
}

.wallet-summary-icon.expense {
    color: #b64b4b;
    background: rgba(205, 72, 72, 0.11);
}

.wallet-summary-icon.balance {
    color: #346db0;
    background: rgba(51, 111, 183, 0.11);
}

.wallet-summary-icon.savings {
    color: #966419;
    background: rgba(205, 147, 47, 0.13);
}

.wallet-trend.positive {
    color: #147557;
}

.wallet-dashboard-grid {
    margin-bottom: 22px;
    display: grid;
    grid-template-columns:
        minmax(0, 1.65fr)
        minmax(330px, 0.75fr);
    gap: 18px;
}

.wallet-panel {
    padding: 24px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow:
        0 13px 36px rgba(27, 65, 57, 0.055);
}

.wallet-panel-header {
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.wallet-panel-header h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
    letter-spacing: -0.025em;
}

.wallet-panel-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.wallet-panel-note {
    color: var(--muted);
    font-size: 0.78rem;
}

.wallet-text-link {
    color: var(--primary);
    font-size: 0.87rem;
    font-weight: 800;
}

.wallet-chart-placeholder {
    height: 285px;
    padding: 18px 6px 0;
    display: flex;
    align-items: stretch;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.wallet-chart-column {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wallet-chart-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
}

.wallet-chart-bar {
    width: min(28px, 38%);
    min-height: 3px;
    display: block;
    border-radius: 8px 8px 3px 3px;
}

.wallet-chart-bar-income {
    background:
        linear-gradient(
            180deg,
            #31b894,
            #137c69
        );
}

.wallet-chart-bar-expense {
    background:
        linear-gradient(
            180deg,
            #7fa1dc,
            #436fae
        );
}

.wallet-chart-column small {
    padding: 10px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.73rem;
    text-align: center;
    text-overflow: ellipsis;
}

.wallet-chart-legend {
    padding-top: 17px;
    display: flex;
    justify-content: center;
    gap: 22px;
    color: var(--muted);
    font-size: 0.8rem;
}

.wallet-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.wallet-chart-legend i {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 3px;
}

.legend-income {
    background: #137c69;
}

.legend-expense {
    background: #436fae;
}

.wallet-category-list,
.wallet-budget-list {
    display: grid;
    gap: 20px;
}

.wallet-category-heading,
.wallet-budget-heading {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wallet-category-heading span,
.wallet-budget-heading span {
    color: var(--muted);
    font-size: 0.82rem;
}

.wallet-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9efed;
}

.wallet-progress span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #169078,
            #3c88a5
        );
}

.wallet-budget-row small {
    margin-top: 7px;
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
}

.wallet-table-wrapper {
    overflow-x: auto;
}

.wallet-table {
    width: 100%;
    border-collapse: collapse;
}

.wallet-table th {
    padding: 0 14px 13px;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.wallet-table td {
    padding: 16px 14px;
    color: #4a5753;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(19, 57, 48, 0.075);
}

.wallet-table tbody tr:last-child td {
    border-bottom: 0;
}

.wallet-table tbody tr:hover {
    background: rgba(19, 124, 105, 0.028);
}

.wallet-table td strong {
    color: var(--text);
}

.text-right {
    text-align: right !important;
}

.wallet-table-badge {
    padding: 6px 9px;
    display: inline-flex;
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--primary-soft);
}

.wallet-amount-expense {
    color: #b24949 !important;
    font-weight: 800;
}

.wallet-footer {
    margin-top: auto;
    padding: 22px 32px 34px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    font-size: 0.8rem;
}

.wallet-footer p {
    margin: 0;
}

@media (max-width: 1180px) {
    .wallet-summary-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wallet-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .wallet-app {
        grid-template-columns: 1fr;
    }

    .wallet-sidebar {
        width: min(310px, 88vw);
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow:
            20px 0 60px rgba(27, 65, 57, 0.18);
    }

    .wallet-sidebar.is-open {
        transform: translateX(0);
    }

    .wallet-menu-button {
        display: grid;
        place-items: center;
    }

    .wallet-topbar {
        padding-inline: 20px;
    }

    .wallet-demo-banner {
        margin-inline: 20px;
    }

    .wallet-content {
        padding-inline: 20px;
    }

    .wallet-footer {
        padding-inline: 20px;
    }
}

@media (max-width: 660px) {
    .wallet-topbar-title span,
    .wallet-user-text,
    .wallet-mode-badge {
        display: none;
    }

    .wallet-demo-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .wallet-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wallet-page-actions {
        width: 100%;
    }

    .wallet-page-actions .button {
        flex: 1;
    }

    .wallet-summary-grid {
        grid-template-columns: 1fr;
    }

    .wallet-content {
        padding-top: 28px;
    }

    .wallet-panel {
        padding: 19px;
    }

    .wallet-chart-placeholder {
        gap: 5px;
    }

    .wallet-chart-bar {
        width: 35%;
    }

    .wallet-footer {
        flex-direction: column;
    }
}
.wallet-filter-panel {
    margin-bottom: 22px;
}

.wallet-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.7fr)
        repeat(
            5,
            minmax(145px, 1fr)
        )
        auto;
    align-items: end;
    gap: 14px;
}

.wallet-field {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.wallet-field > span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.wallet-field input,
.wallet-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    outline: none;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.9);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wallet-field input:focus,
.wallet-field select:focus {
    border-color: rgba(19, 124, 105, 0.52);
    box-shadow:
        0 0 0 4px rgba(19, 124, 105, 0.09);
}

.wallet-filter-actions {
    display: flex;
    align-items: flex-end;
}

.wallet-record-counter {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: var(--muted);
}

.wallet-record-counter strong {
    color: var(--text);
    font-size: 1.45rem;
}

.wallet-record-counter span {
    font-size: 0.8rem;
}

.wallet-table-secondary {
    margin-top: 5px;
    display: block;
    color: var(--muted);
    font-size: 0.73rem;
}

.wallet-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.wallet-status-badge {
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    font-size: 0.69rem;
    font-weight: 800;
    border-radius: 999px;
}

.wallet-status-badge.fixed {
    color: #365f9f;
    background: rgba(62, 111, 183, 0.12);
}

.wallet-status-badge.variable {
    color: #806020;
    background: rgba(202, 153, 45, 0.14);
}

.wallet-status-badge.recurring {
    color: #147354;
    background: rgba(24, 149, 105, 0.12);
}

.wallet-sort-button {
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.wallet-sort-button span {
    color: var(--primary);
}

.wallet-actions-column {
    width: 68px;
    text-align: center !important;
}

.wallet-icon-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--text);
    font-size: 1.1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.wallet-icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(19, 124, 105, 0.32);
    background: var(--primary-soft);
}

.wallet-table-summary {
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 22px;
    color: var(--muted);
    font-size: 0.84rem;
    border-top: 1px solid var(--border);
}

.wallet-table-summary strong {
    color: var(--text);
}

.wallet-empty-state {
    padding: 60px 20px;
    text-align: center;
}

.wallet-empty-state strong {
    display: block;
    margin-bottom: 7px;
    font-size: 1.15rem;
}

.wallet-empty-state p {
    margin: 0;
    color: var(--muted);
}

.wallet-modal[hidden] {
    display: none;
}

.wallet-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.wallet-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 28, 25, 0.52);
    backdrop-filter: blur(7px);
}

.wallet-modal-dialog {
    width: min(680px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 24px;
    background: #ffffff;
    box-shadow:
        0 32px 90px rgba(10, 35, 29, 0.28);
}

.wallet-modal-header,
.wallet-modal-footer {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.wallet-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(15px);
}

.wallet-modal-header h2 {
    margin: 0;
    font-size: 1.45rem;
}

.wallet-modal-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    color: var(--muted);
    font-size: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.wallet-modal-body {
    padding: 24px;
}

.wallet-detail-amount {
    margin-bottom: 24px;
    padding: 22px;
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(250, 232, 232, 0.85),
            rgba(255, 245, 240, 0.9)
        );
}

.wallet-detail-amount span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.wallet-detail-amount strong {
    color: #ad4242;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.wallet-detail-grid {
    margin: 0;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 14px;
}

.wallet-detail-grid > div {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafcfb;
}

.wallet-detail-grid dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.wallet-detail-grid dd {
    margin: 0;
    font-weight: 700;
}

.wallet-detail-description {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.wallet-detail-description span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.wallet-detail-description p {
    margin: 0;
    line-height: 1.7;
}

.wallet-modal-footer {
    position: sticky;
    bottom: 0;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
}

.wallet-modal-demo-note {
    color: var(--muted);
    font-size: 0.8rem;
}

.wallet-modal-open {
    overflow: hidden;
}

@media (max-width: 1450px) {
    .wallet-filter-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

    .wallet-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    .wallet-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wallet-field-wide {
        grid-column: span 2;
    }

    .wallet-filter-actions .button {
        width: 100%;
    }
}

@media (max-width: 660px) {
    .wallet-filter-grid {
        grid-template-columns: 1fr;
    }

    .wallet-field-wide {
        grid-column: auto;
    }

    .wallet-expenses-table thead {
        display: none;
    }

    .wallet-expenses-table,
    .wallet-expenses-table tbody,
    .wallet-expenses-table tr,
    .wallet-expenses-table td {
        width: 100%;
        display: block;
    }

    .wallet-expenses-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: #fff;
    }

    .wallet-expenses-table td {
        padding: 9px 0;
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
        text-align: left !important;
        border-bottom: 1px solid rgba(19, 57, 48, 0.07);
    }

    .wallet-expenses-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
    }

    .wallet-expenses-table td:last-child {
        border-bottom: 0;
    }

    .wallet-expenses-table .wallet-actions-column {
        width: 100%;
        align-items: center;
    }

    .wallet-table-summary {
        justify-content: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .wallet-detail-grid {
        grid-template-columns: 1fr;
    }

    .wallet-modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .wallet-modal-footer .button {
        width: 100%;
    }
}
.wallet-income-filter-grid {
    grid-template-columns:
        minmax(220px, 1.6fr)
        repeat(
            6,
            minmax(140px, 1fr)
        )
        auto;
}

.wallet-income-badge {
    color: #0e7151;
    background: rgba(24, 160, 108, 0.12);
}

.wallet-amount-income {
    color: #107552 !important;
    font-weight: 800;
}

.wallet-status-badge.income-fixed {
    color: #147354;
    background: rgba(24, 149, 105, 0.12);
}

.wallet-status-badge.income-variable {
    color: #365f9f;
    background: rgba(62, 111, 183, 0.12);
}

.wallet-status-badge.taxed {
    color: #66519a;
    background: rgba(111, 85, 170, 0.12);
}

.wallet-status-badge.untaxed {
    color: #806020;
    background: rgba(202, 153, 45, 0.14);
}

.wallet-income-detail-amount {
    background:
        linear-gradient(
            135deg,
            rgba(225, 246, 238, 0.92),
            rgba(235, 247, 243, 0.95)
        );
}

.wallet-income-detail-amount strong {
    color: #107552;
}

@media (max-width: 1550px) {
    .wallet-income-filter-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

    .wallet-income-filter-grid .wallet-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 1050px) {
    .wallet-income-filter-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 820px) {
    .wallet-income-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wallet-income-filter-grid .wallet-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 660px) {
    .wallet-income-filter-grid {
        grid-template-columns: 1fr;
    }

    .wallet-income-filter-grid .wallet-field-wide {
        grid-column: auto;
    }

    .wallet-incomes-table thead {
        display: none;
    }

    .wallet-incomes-table,
    .wallet-incomes-table tbody,
    .wallet-incomes-table tr,
    .wallet-incomes-table td {
        width: 100%;
        display: block;
    }

    .wallet-incomes-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: #fff;
    }

    .wallet-incomes-table td {
        padding: 9px 0;
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
        text-align: left !important;
        border-bottom: 1px solid rgba(19, 57, 48, 0.07);
    }

    .wallet-incomes-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
    }

    .wallet-incomes-table td:last-child {
        border-bottom: 0;
    }

    .wallet-incomes-table .wallet-actions-column {
        width: 100%;
        align-items: center;
    }
}
.wallet-member-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 18px;
}

.wallet-member-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(
            150deg,
            rgba(255, 255, 255, 0.96),
            rgba(248, 251, 250, 0.96)
        );
}

.wallet-member-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-member-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
    border-radius: 15px;
}

.wallet-member-avatar.green {
    background:
        linear-gradient(
            135deg,
            #159272,
            #116e83
        );
}

.wallet-member-avatar.blue {
    background:
        linear-gradient(
            135deg,
            #407dcc,
            #586bc0
        );
}

.wallet-member-avatar.purple {
    background:
        linear-gradient(
            135deg,
            #7b5bb4,
            #99609f
        );
}

.wallet-member-title {
    min-width: 0;
    flex: 1;
}

.wallet-member-title h3 {
    margin-bottom: 3px;
    font-size: 1rem;
}

.wallet-member-title span {
    color: var(--muted);
    font-size: 0.78rem;
}

.wallet-member-role {
    margin: 18px 0;
    padding: 10px 12px;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 12px;
    background: var(--primary-soft);
}

.wallet-member-finances {
    display: grid;
    gap: 10px;
}

.wallet-member-finances > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.wallet-member-finances span,
.wallet-member-share span {
    color: var(--muted);
    font-size: 0.78rem;
}

.wallet-member-finances strong {
    font-size: 0.88rem;
}

.wallet-member-share {
    margin: 18px 0;
}

.wallet-member-share > div:first-child {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.wallet-progress-expense span {
    background:
        linear-gradient(
            90deg,
            #ca665f,
            #d38b62
        );
}

.wallet-account-list {
    display: grid;
    gap: 12px;
}

.wallet-account-row {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fafcfb;
}

.wallet-account-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    color: var(--primary);
    font-weight: 900;
    border-radius: 13px;
    background: var(--primary-soft);
}

.wallet-account-info {
    min-width: 0;
    flex: 1;
}

.wallet-account-info strong,
.wallet-account-info span {
    display: block;
}

.wallet-account-info span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
}

.wallet-account-balance {
    font-size: 1rem;
}

.wallet-household-expense-overview {
    display: grid;
    gap: 24px;
}

.wallet-household-expense-item > div:first-child {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.wallet-household-expense-item span {
    color: var(--muted);
}

.wallet-household-expense-item small {
    margin-top: 8px;
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
}

.wallet-goal-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 16px;
}

.wallet-goal-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fafcfb;
}

.wallet-goal-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.wallet-goal-header h3 {
    margin-bottom: 4px;
    font-size: 1rem;
}

.wallet-goal-header span {
    color: var(--muted);
    font-size: 0.75rem;
}

.wallet-goal-header > strong {
    color: var(--primary);
    font-size: 1.15rem;
}

.wallet-goal-values {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.wallet-goal-values span {
    color: var(--muted);
    font-size: 0.74rem;
}

.wallet-goal-values strong {
    margin-top: 3px;
    display: block;
    color: var(--text);
    font-size: 0.82rem;
}

.wallet-member-modal-profile {
    margin-bottom: 22px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            rgba(225, 245, 239, 0.9),
            rgba(235, 242, 253, 0.9)
        );
}

.wallet-member-modal-profile strong,
.wallet-member-modal-profile span {
    display: block;
}

.wallet-member-modal-profile strong {
    margin-bottom: 4px;
    font-size: 1.08rem;
}

.wallet-member-modal-profile span {
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 1180px) {
    .wallet-member-grid,
    .wallet-goal-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 720px) {
    .wallet-member-grid,
    .wallet-goal-grid {
        grid-template-columns: 1fr;
    }

    .wallet-account-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .wallet-account-balance {
        width: 100%;
        padding-left: 56px;
    }

    .wallet-goal-values {
        flex-direction: column;
    }
}
.wallet-budget-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.8fr)
        repeat(
            3,
            minmax(170px, 1fr)
        )
        auto;
    align-items: end;
    gap: 14px;
}

.wallet-budget-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 18px;
}

.wallet-budget-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(
            150deg,
            rgba(255, 255, 255, 0.97),
            rgba(248, 251, 250, 0.96)
        );
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.wallet-budget-card:hover {
    transform: translateY(-2px);
    border-color: rgba(19, 124, 105, 0.22);
    box-shadow:
        0 16px 36px rgba(27, 65, 57, 0.08);
}

.wallet-budget-card-header {
    margin-bottom: 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wallet-budget-type {
    color: var(--primary);
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wallet-budget-status {
    padding: 6px 9px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 999px;
}

.wallet-budget-status.active {
    color: #0f7353;
    background: rgba(24, 149, 105, 0.12);
}

.wallet-budget-status.draft {
    color: #7e5c1e;
    background: rgba(202, 153, 45, 0.14);
}

.wallet-budget-status.completed {
    color: #355f9e;
    background: rgba(62, 111, 183, 0.12);
}

.wallet-budget-status.archived {
    color: #666f6c;
    background: rgba(98, 113, 108, 0.12);
}

.wallet-budget-card h3 {
    margin-bottom: 10px;
    font-size: 1.18rem;
    line-height: 1.3;
}

.wallet-budget-card > p {
    min-height: 50px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.wallet-budget-meta {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 10px;
}

.wallet-budget-meta span {
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

.wallet-budget-meta strong {
    margin-bottom: 2px;
    display: block;
    color: var(--text);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wallet-budget-main-value {
    margin-bottom: 18px;
    padding: 17px;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            rgba(225, 245, 239, 0.85),
            rgba(237, 244, 255, 0.9)
        );
}

.wallet-budget-main-value span,
.wallet-budget-main-value small {
    display: block;
    color: var(--muted);
}

.wallet-budget-main-value span {
    margin-bottom: 5px;
    font-size: 0.75rem;
    font-weight: 800;
}

.wallet-budget-main-value strong {
    display: block;
    margin-bottom: 3px;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.wallet-budget-main-value small {
    font-size: 0.75rem;
}

.wallet-budget-progress-heading {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.wallet-budget-progress-heading span {
    color: var(--muted);
    font-size: 0.75rem;
}

.wallet-budget-progress-heading strong {
    font-size: 0.78rem;
}

.wallet-progress-over span {
    background:
        linear-gradient(
            90deg,
            #c84f4f,
            #e17b54
        );
}

.wallet-budget-values {
    margin: 18px 0;
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 10px;
}

.wallet-budget-values div {
    min-width: 0;
}

.wallet-budget-values span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.69rem;
}

.wallet-budget-values strong {
    font-size: 0.8rem;
}

.wallet-budget-card .button {
    margin-top: auto;
}

.wallet-budget-modal-dialog {
    width: min(1080px, 100%);
}

.wallet-budget-detail-summary {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
    gap: 12px;
}

.wallet-budget-detail-summary article {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fafcfb;
}

.wallet-budget-detail-summary span,
.wallet-budget-detail-summary strong {
    display: block;
}

.wallet-budget-detail-summary span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.wallet-budget-detail-summary strong {
    font-size: 1.08rem;
}

.wallet-budget-items-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.wallet-budget-items-table td {
    vertical-align: middle;
}

@media (max-width: 1350px) {
    .wallet-budget-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wallet-budget-filter-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

    .wallet-budget-filter-grid .wallet-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .wallet-budget-detail-summary {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 760px) {
    .wallet-budget-grid {
        grid-template-columns: 1fr;
    }

    .wallet-budget-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wallet-budget-filter-grid .wallet-field-wide {
        grid-column: span 2;
    }

    .wallet-budget-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 660px) {
    .wallet-budget-filter-grid {
        grid-template-columns: 1fr;
    }

    .wallet-budget-filter-grid .wallet-field-wide {
        grid-column: auto;
    }

    .wallet-budget-values {
        grid-template-columns: 1fr;
    }

    .wallet-budget-detail-summary {
        grid-template-columns: 1fr;
    }

    .wallet-budget-items-table thead {
        display: none;
    }

    .wallet-budget-items-table,
    .wallet-budget-items-table tbody,
    .wallet-budget-items-table tr,
    .wallet-budget-items-table td {
        width: 100%;
        display: block;
    }

    .wallet-budget-items-table tr {
        margin-bottom: 12px;
        padding: 13px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: #fff;
    }

    .wallet-budget-items-table td {
        padding: 8px 0;
        display: grid;
        grid-template-columns: 105px minmax(0, 1fr);
        gap: 10px;
        text-align: left !important;
        border-bottom: 1px solid rgba(19, 57, 48, 0.07);
    }

    .wallet-budget-items-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.7rem;
        font-weight: 800;
    }

    .wallet-budget-items-table td:last-child {
        border-bottom: 0;
    }
}
.wallet-template-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.7fr)
        repeat(
            4,
            minmax(155px, 1fr)
        )
        auto;
    align-items: end;
    gap: 14px;
}

.wallet-template-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 18px;
}

.wallet-template-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 21px;
    background:
        linear-gradient(
            150deg,
            rgba(255, 255, 255, 0.98),
            rgba(247, 251, 249, 0.97)
        );
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wallet-template-card:hover {
    transform: translateY(-3px);
    border-color: rgba(19, 124, 105, 0.23);
    box-shadow:
        0 18px 42px rgba(27, 65, 57, 0.09);
}

.wallet-template-card-top {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.wallet-template-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
    border-radius: 17px;
    background:
        linear-gradient(
            135deg,
            #148b74,
            #3979ad
        );
    box-shadow:
        0 12px 28px rgba(19, 124, 105, 0.2);
}

.wallet-template-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.wallet-template-badge {
    padding: 6px 9px;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 999px;
}

.wallet-template-badge.featured {
    color: #7b5716;
    background: rgba(220, 163, 46, 0.15);
}

.wallet-template-badge.recommended {
    color: #0e7252;
    background: rgba(24, 149, 105, 0.12);
}

.wallet-template-category {
    margin-bottom: 7px;
    display: block;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.wallet-template-card h3 {
    margin-bottom: 10px;
    font-size: 1.22rem;
}

.wallet-template-card > p {
    min-height: 72px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.65;
}

.wallet-template-meta {
    margin-bottom: 17px;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 10px;
}

.wallet-template-meta span {
    color: var(--muted);
    font-size: 0.76rem;
}

.wallet-template-meta strong {
    margin-bottom: 3px;
    display: block;
    color: var(--text);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wallet-template-budget {
    margin-bottom: 18px;
    padding: 17px;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            rgba(225, 245, 239, 0.88),
            rgba(236, 244, 255, 0.92)
        );
}

.wallet-template-budget span,
.wallet-template-budget strong,
.wallet-template-budget small {
    display: block;
}

.wallet-template-budget span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 800;
}

.wallet-template-budget strong {
    margin-bottom: 4px;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.wallet-template-budget small {
    color: var(--muted);
    font-size: 0.73rem;
}

.wallet-template-stats {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 9px;
}

.wallet-template-stats div {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafcfb;
}

.wallet-template-stats span,
.wallet-template-stats strong {
    display: block;
}

.wallet-template-stats span {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.69rem;
}

.wallet-template-stats strong {
    font-size: 1rem;
}

.wallet-template-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 9px;
}

.wallet-template-actions .button {
    padding-inline: 12px;
}

.wallet-template-modal-dialog {
    width: min(1120px, 100%);
}

.wallet-template-detail-intro {
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(226, 245, 239, 0.9),
            rgba(236, 244, 255, 0.92)
        );
}

.wallet-template-detail-intro > div {
    min-width: 0;
}

.wallet-template-detail-intro p {
    margin-bottom: 14px;
    color: #45534f;
    line-height: 1.7;
}

.wallet-template-detail-icon {
    flex: 0 0 58px;
}

.wallet-template-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.wallet-template-detail-tags span {
    padding: 6px 9px;
    color: var(--primary-dark);
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
}

.wallet-template-detail-summary {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 12px;
}

.wallet-template-detail-summary article {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fafcfb;
}

.wallet-template-detail-summary span,
.wallet-template-detail-summary strong {
    display: block;
}

.wallet-template-detail-summary span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.wallet-template-detail-summary strong {
    font-size: 1.15rem;
}

.wallet-template-detail-section {
    margin-top: 25px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.wallet-template-detail-section > h2 {
    margin-bottom: 17px;
    font-size: 1.35rem;
}

.wallet-template-detail-columns {
    margin-top: 24px;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 16px;
}

.wallet-template-detail-columns article {
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fafcfb;
}

.wallet-template-detail-columns h3 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.wallet-template-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.wallet-template-chip {
    padding: 7px 10px;
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--primary-soft);
}

.wallet-template-tip-list {
    margin: 0;
    padding-left: 22px;
    display: grid;
    gap: 10px;
    color: #46534f;
    line-height: 1.6;
}

.wallet-template-tip-list li {
    padding-left: 5px;
}

.wallet-modal-footer-actions {
    display: flex;
    gap: 9px;
}

@media (max-width: 1450px) {
    .wallet-template-filter-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

    .wallet-template-filter-grid .wallet-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 1250px) {
    .wallet-template-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 850px) {
    .wallet-template-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wallet-template-filter-grid .wallet-field-wide {
        grid-column: span 2;
    }

    .wallet-template-detail-summary {
        grid-template-columns: 1fr;
    }

    .wallet-template-detail-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .wallet-template-grid {
        grid-template-columns: 1fr;
    }

    .wallet-template-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 660px) {
    .wallet-template-filter-grid {
        grid-template-columns: 1fr;
    }

    .wallet-template-filter-grid .wallet-field-wide {
        grid-column: auto;
    }

    .wallet-template-detail-intro {
        flex-direction: column;
    }

    .wallet-template-items-table thead {
        display: none;
    }

    .wallet-template-items-table,
    .wallet-template-items-table tbody,
    .wallet-template-items-table tr,
    .wallet-template-items-table td {
        width: 100%;
        display: block;
    }

    .wallet-template-items-table tr {
        margin-bottom: 12px;
        padding: 13px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: #fff;
    }

    .wallet-template-items-table td {
        padding: 8px 0;
        display: grid;
        grid-template-columns: 115px minmax(0, 1fr);
        gap: 10px;
        text-align: left !important;
        border-bottom: 1px solid rgba(19, 57, 48, 0.07);
    }

    .wallet-template-items-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.7rem;
        font-weight: 800;
    }

    .wallet-template-items-table td:last-child {
        border-bottom: 0;
    }

    .wallet-modal-footer-actions {
        width: 100%;
        flex-direction: column;
    }

    .wallet-modal-footer-actions .button {
        width: 100%;
    }
}
.wallet-expense-form-dialog {
    width: min(820px, 100%);
}

.wallet-form-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 17px;
}

.wallet-field-span-2 {
    grid-column: span 2;
}

.wallet-field textarea {
    width: 100%;
    padding: 12px;
    resize: vertical;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    line-height: 1.6;
    outline: none;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.9);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wallet-field textarea:focus {
    border-color: rgba(19, 124, 105, 0.52);
    box-shadow:
        0 0 0 4px rgba(19, 124, 105, 0.09);
}

.wallet-input-suffix {
    display: flex;
    align-items: stretch;
}

.wallet-input-suffix input {
    border-radius: 13px 0 0 13px;
}

.wallet-input-suffix > span {
    min-width: 52px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid var(--border);
    border-left: 0;
    border-radius: 0 13px 13px 0;
    background: #f4f7f6;
}

.wallet-checkbox-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 12px;
}

.wallet-checkbox {
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafcfb;
}

.wallet-checkbox input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

.wallet-checkbox > span {
    min-width: 0;
}

.wallet-checkbox strong,
.wallet-checkbox small {
    display: block;
}

.wallet-checkbox strong {
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.wallet-checkbox small {
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.45;
}

.wallet-field-error {
    min-height: 16px;
    color: #b34141;
    font-size: 0.72rem;
    line-height: 1.4;
}

.wallet-field-has-error input,
.wallet-field-has-error select,
.wallet-field-has-error textarea {
    border-color: rgba(190, 58, 58, 0.65);
    box-shadow:
        0 0 0 3px rgba(190, 58, 58, 0.08);
}

.wallet-form-message {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 0.84rem;
    font-weight: 700;
}

.wallet-form-message.error {
    color: #923a3a;
    border: 1px solid rgba(190, 58, 58, 0.2);
    background: rgba(239, 214, 214, 0.65);
}

.wallet-form-message.success {
    color: #106b4d;
    border: 1px solid rgba(24, 149, 105, 0.2);
    background: rgba(218, 241, 232, 0.8);
}

@media (max-width: 660px) {
    .wallet-form-grid {
        grid-template-columns: 1fr;
    }

    .wallet-field-span-2 {
        grid-column: auto;
    }

    .wallet-checkbox-grid {
        grid-template-columns: 1fr;
    }
}
.wallet-button-danger {
    color: #a53535;
    border-color: rgba(188, 56, 56, 0.24);
    background: rgba(239, 218, 218, 0.75);
}

.wallet-button-danger:hover {
    color: #fff;
    background: #b74343;
    box-shadow:
        0 12px 24px rgba(183, 67, 67, 0.2);
}
