:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --paper: #eef2f7;
    --card: rgba(255, 255, 255, 0.12);
    --line: rgba(255, 255, 255, 0.42);
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #dbeafe;
    --income: #047857;
    --expense: #be123c;
    --warn: #b45309;
    --shadow:
        0 8px 28px rgba(15, 23, 42, 0.07),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.5);
    --sidebar: #0b1220;
    --sidebar-text: #cbd5e1;
    --radius: 18px;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-mid: rgba(255, 255, 255, 0.18);
    --glass-strong: rgba(255, 255, 255, 0.28);
    --glass-brand: rgba(37, 99, 235, 0.48);
    --glass-blur: blur(20px) saturate(165%);
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, var(--paper) 100%);
}

a { color: var(--brand); }

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    color: #e2e8f0;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.6rem 1.4rem;
}

.brand-mark strong {
    display: block;
    letter-spacing: 0.06em;
    font-size: 1.05rem;
}

.sidebar nav {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    margin-bottom: 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(96, 165, 250, 0.16);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.25rem 0.6rem 0.2rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.45;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.app-footer {
    margin-top: 1.25rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-align: center;
}

.content {
    padding: 1.5rem;
    min-width: 0;
}

.topbar,
.card,
.auth-card,
.install-card {
    background: var(--glass);
    border: 0.5px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}

.topbar-start,
.topbar-end {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar-clock {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    white-space: nowrap;
    padding: 0.35rem 0.7rem;
    border: 0.5px solid var(--line);
    border-radius: 999px;
    background: var(--glass-mid);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.55);
}

.topbar-clock small {
    font-weight: 700;
    color: var(--brand);
}

.topbar-clock [data-lima-clock-short] {
    display: none;
}

.nav-toggle,
.sidebar-close,
.sidebar-overlay,
.mobile-bottom-nav,
.quick-sheet {
    display: none;
}

.page-title { margin: 0; font-size: 1.35rem; }
.page-title small { display: block; color: var(--ink-soft); font-size: 0.85rem; font-weight: 400; }

.card {
    border-radius: var(--radius);
    padding: 1.15rem;
}

.kpi.card {
    height: 100%;
}

.kpi {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.kpi .label { color: var(--ink-soft); font-size: 0.86rem; margin-bottom: 0.35rem; }
.kpi .value { font-size: clamp(1.05rem, 3.5vw, 1.45rem); font-weight: 700; word-break: break-word; }
.kpi .icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.55);
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.kpi-row > .kpi {
    min-width: 0;
}

.kpi-row .kpi > div:first-child {
    min-width: 0;
}

.kpi-income .icon { background: rgba(209, 250, 229, 0.45); color: var(--income); }
.kpi-expense .icon { background: rgba(255, 228, 230, 0.5); color: var(--expense); }
.kpi-week .icon { background: rgba(255, 237, 213, 0.5); color: #c2410c; }
.kpi-balance .icon { background: rgba(219, 234, 254, 0.5); color: var(--brand-dark); }
.kpi-net .icon { background: rgba(224, 231, 255, 0.5); color: #3730a3; }

.text-income { color: var(--income); font-weight: 600; }
.text-expense { color: var(--expense); font-weight: 600; }
.text-transfer { color: #0369a1; font-weight: 600; }

.table thead th {
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.08);
}

.badge-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-dot i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 99px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn,
.btn-logout,
.tx-date-chip,
.pagination .page-link {
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.45);
}

.btn-brand,
.tx-submit {
    background: var(--glass-brand);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow:
        inset 0 0.5px 0 rgba(255, 255, 255, 0.45),
        0 6px 16px rgba(37, 99, 235, 0.18);
}

.btn-brand:hover,
.btn-brand:focus,
.tx-submit:hover {
    background: rgba(37, 99, 235, 0.62);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    filter: none;
}

.btn-outline-secondary,
.btn-light,
.btn-logout {
    background: var(--glass-mid);
    border: 0.5px solid var(--line);
    color: var(--ink);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-light:hover,
.btn-light:focus,
.btn-logout:hover {
    background: var(--glass-strong);
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--ink);
}

.btn-outline-danger {
    background: rgba(190, 18, 60, 0.12);
    border: 0.5px solid rgba(255, 180, 190, 0.45);
    color: var(--expense);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: rgba(190, 18, 60, 0.22);
    border-color: rgba(255, 180, 190, 0.6);
    color: var(--expense);
}

.form-control,
.form-select {
    background: var(--glass-mid);
    border: 0.5px solid var(--line);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.form-control:focus,
.form-select:focus {
    background: var(--glass-strong);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.alert {
    background: var(--glass-mid);
    border: 0.5px solid var(--line);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.alert-success {
    background: rgba(209, 250, 229, 0.35);
    color: #065f46;
}

.alert-info {
    background: rgba(219, 234, 254, 0.42);
    color: #1e3a8a;
    word-break: break-word;
}

.pagination .page-link {
    background: var(--glass-mid);
    border-color: var(--line);
}

.pagination .page-item.active .page-link {
    background: var(--glass-brand);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.btn-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
}

.btn-stack i {
    font-size: 1.15rem;
    line-height: 1;
}

.btn-stack span {
    font-size: 0.72rem;
    font-weight: 600;
}

.btn-stack.btn-sm {
    padding: 0.45rem 0.35rem;
}

.btn-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.btn-actions form {
    flex: 0 0 auto;
    margin: 0;
}

.btn-actions .btn,
.btn-actions .btn.btn-stack,
.btn-actions .btn.btn-sm {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 0.5rem 0.9rem;
    white-space: nowrap;
}

.btn-actions .btn.btn-stack i,
.btn-actions .btn.btn-sm i {
    font-size: 1.05rem;
    line-height: 1;
}

.btn-action {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 42px;
    padding: 0.5rem 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-action i {
    font-size: 1.05rem;
    line-height: 1;
}

.btn-action span {
    font-size: 0.88rem;
}

.pagination .page-link {
    color: var(--brand-dark);
}

.pagination .page-link:hover {
    color: var(--brand-dark);
    background: var(--glass-strong);
    border-color: var(--line);
}

.pagination .page-item.active .page-link {
    background: var(--glass-brand);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.filters {
    background: var(--glass);
    border: 0.5px dashed var(--line);
    border-radius: 16px;
    padding: 1rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow);
}

.auth-body,
.install-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-body {
    background:
        radial-gradient(circle at 12% 16%, rgba(37, 99, 235, 0.2), transparent 34%),
        radial-gradient(circle at 90% 88%, rgba(14, 165, 233, 0.16), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, var(--paper) 100%);
}

.auth-shell {
    width: min(920px, 100%);
    display: grid;
    gap: 1.35rem;
}

.auth-intro {
    padding: 0.15rem 0.35rem 0;
    text-align: center;
}

.auth-wordmark {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.1;
    color: var(--ink);
}

.auth-intro__text {
    margin: 0.45rem auto 0;
    color: var(--ink-soft);
    font-size: 1.02rem;
    max-width: 22rem;
}

.auth-points {
    display: none;
    list-style: none;
    margin: 1.35rem 0 0;
    padding: 0;
    gap: 0.7rem;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.auth-points i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--glass-mid);
    border: 0.5px solid var(--line);
    color: var(--brand-dark);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.auth-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 700;
}

.auth-card__lead {
    margin: 0 0 1.2rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.auth-form__aside {
    display: flex;
    justify-content: flex-end;
    margin: 0.55rem 0 1.15rem;
    font-size: 0.9rem;
}

.auth-form__footer {
    text-align: center;
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    font-weight: 600;
}

.auth-field {
    position: relative;
}

.auth-field .form-control {
    min-height: 48px;
    padding-left: 2.7rem;
    padding-right: 2.7rem;
}

.auth-field__icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 1.05rem;
}

.auth-field__toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 10px;
    cursor: pointer;
}

.auth-field__toggle:hover,
.auth-field__toggle:focus-visible {
    color: var(--brand-dark);
    background: rgba(255, 255, 255, 0.35);
}

@media (max-width: 576px) {
    .auth-body,
    .install-body { padding: 1rem; }

    .auth-card,
    .install-card { padding: 1.25rem; border-radius: 18px; }

    .auth-wordmark { font-size: 1.45rem; }
}

@media (min-width: 900px) {
    .auth-shell {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        align-items: center;
        gap: 2.75rem;
    }

    .auth-intro {
        padding: 0.5rem 0.25rem 0.5rem 0.5rem;
        text-align: left;
    }

    .auth-intro__text {
        margin-left: 0;
        margin-right: 0;
    }

    .auth-wordmark { font-size: 2.15rem; }

    .auth-points {
        display: grid;
        margin-top: 1.75rem;
    }
}

.auth-card,
.install-card {
    border-radius: 24px;
    padding: 2rem;
}

.auth-card { width: 100%; }
.install-card { width: min(860px, 100%); }

.check-ok { color: var(--income); }
.check-fail { color: var(--expense); }

.empty-state {
    text-align: center;
    color: var(--ink-soft);
    padding: 2rem 1rem;
}

.logout-form {
    margin: 0;
    flex-shrink: 0;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 38px;
    padding: 0.4rem 0.85rem;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
}

.logout-form--sidebar {
    display: none;
}

.sidebar-account {
    display: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
}

.user-chip:hover {
    color: inherit;
}

.user-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 700;
    line-height: 1;
}

.user-avatar i {
    font-size: 0.95em;
}

.user-avatar--sm { width: 32px; height: 32px; font-size: 0.95rem; }
.user-avatar--md { width: 36px; height: 36px; font-size: 1.05rem; }
.user-avatar--lg { width: 56px; height: 56px; font-size: 1.45rem; }
.user-avatar--xl { width: 88px; height: 88px; font-size: 2.1rem; }

.user-avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-user {
    display: none;
}

@media (max-width: 992px) {
    .app-shell { grid-template-columns: 1fr; }

    .content {
        padding: 0.85rem 0.85rem calc(5.85rem + env(safe-area-inset-bottom));
        min-width: 0;
    }

    .topbar {
        position: sticky;
        top: 0.85rem;
        z-index: 20;
        padding: 0.7rem 0.8rem;
        margin-bottom: 0.9rem;
        gap: 0.55rem;
    }

    .topbar-start {
        flex: 1;
        min-width: 0;
        gap: 0.55rem;
    }

    .topbar-end {
        flex-shrink: 0;
        gap: 0.4rem;
    }

    .page-title { font-size: 1.05rem; min-width: 0; }
    .page-title small { display: none; }
    .page-title__text {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .form-control,
    .form-select {
        font-size: 16px;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.48);
        color: var(--ink);
        flex-shrink: 0;
        padding: 0;
        backdrop-filter: blur(18px) saturate(180%);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        box-shadow:
            0 6px 18px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.85);
    }

    .sidebar-close {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border-radius: 14px;
        flex-shrink: 0;
        padding: 0;
        margin-left: auto;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #e2e8f0;
        backdrop-filter: blur(16px) saturate(160%);
        -webkit-backdrop-filter: blur(16px) saturate(160%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }

    .brand-mark { padding-bottom: 1rem; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 320px);
        height: 100dvh;
        z-index: 1040;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(11, 18, 32, 0.72);
        backdrop-filter: blur(28px) saturate(160%);
        -webkit-backdrop-filter: blur(28px) saturate(160%);
        border-right: 0.5px solid rgba(255, 255, 255, 0.08);
    }

    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open,
    body.sheet-open { overflow: hidden; }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.48);
        z-index: 1030;
    }

    body.nav-open .sidebar-overlay { display: block; }

    .sidebar-account {
        display: block;
        margin-top: auto;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
    }

    .sidebar-user {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.85rem 0.6rem 0.55rem;
        margin-top: 0;
        border-top: 0;
    }

    .sidebar-user__link {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        min-width: 0;
        color: inherit;
        text-decoration: none;
    }

    .sidebar-user .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        flex-shrink: 0;
    }

    .sidebar-user strong { display: block; font-size: 0.9rem; }
    .sidebar-user small { color: #94a3b8; font-size: 0.75rem; }
    .sidebar-footer { margin-top: 0; border-top: 0; padding-top: 0.4rem; }

    .logout-form--sidebar {
        display: block;
        padding: 0 0.6rem 0.75rem;
    }

    .btn-logout--sidebar {
        width: 100%;
        min-height: 44px;
        padding: 0.65rem 0.85rem;
        border-color: rgba(252, 165, 165, 0.45);
        background: rgba(127, 29, 29, 0.42);
        color: #fecaca;
    }

    .btn-logout--sidebar:hover {
        background: rgba(153, 27, 27, 0.55);
        color: #fff;
    }

    .user-chip {
        display: none;
    }

    .btn-logout-text { display: none; }

    .topbar-end .btn-logout {
        width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        flex-shrink: 0;
        font-size: 1.15rem;
        border: 1px solid rgba(255, 255, 255, 0.62);
        background: rgba(255, 255, 255, 0.48);
        backdrop-filter: blur(18px) saturate(180%);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        box-shadow:
            0 6px 18px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.85);
    }

    .topbar-clock {
        padding: 0.3rem 0.55rem;
        font-size: 0.75rem;
    }

    .topbar-clock small { display: none; }
    .topbar-clock [data-lima-clock-full] { display: none; }
    .topbar-clock [data-lima-clock-short] { display: inline; }

    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1020;
        isolation: isolate;
        height: 64px;
        padding: 4px;
        border-radius: 32px;
        background: rgba(255, 255, 255, 0.08);
        border: 0.5px solid rgba(255, 255, 255, 0.38);
        backdrop-filter: blur(28px) saturate(160%);
        -webkit-backdrop-filter: blur(28px) saturate(160%);
        box-shadow:
            0 8px 24px rgba(15, 23, 42, 0.08),
            0 0 0 0.5px rgba(15, 23, 42, 0.03),
            inset 0 0.5px 0 rgba(255, 255, 255, 0.45),
            inset 0 -0.5px 0 rgba(255, 255, 255, 0.08);
    }

    .mobile-bottom-nav::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 36%, rgba(255, 255, 255, 0) 62%);
        z-index: 0;
    }

    .mobile-bottom-nav::after {
        content: "";
        position: absolute;
        left: 18%;
        right: 18%;
        top: 1px;
        height: 1px;
        border-radius: 999px;
        pointer-events: none;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
        z-index: 2;
    }

    .mobile-bottom-nav > * {
        position: relative;
        z-index: 1;
    }

    .mobile-bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        height: 56px;
        min-width: 0;
        margin: 0;
        border: 0;
        background: transparent;
        color: rgba(60, 60, 67, 0.72);
        text-decoration: none;
        font-family: inherit;
        appearance: none;
        -webkit-appearance: none;
        padding: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-nav__lens {
        display: grid;
        place-items: center;
        width: 56px;
        height: 32px;
        border-radius: 16px;
        color: inherit;
        transition: background 0.22s ease, box-shadow 0.22s ease;
    }

    .mobile-bottom-nav__lens i {
        font-size: 1.28rem;
        line-height: 1;
    }

    .mobile-bottom-nav__label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.15;
        padding: 0 2px;
    }

    .mobile-bottom-nav__item.is-active {
        color: var(--brand-dark);
    }

    .mobile-bottom-nav__item.is-active .mobile-bottom-nav__lens {
        background: rgba(255, 255, 255, 0.28);
        box-shadow:
            inset 0 0.5px 0 rgba(255, 255, 255, 0.55),
            inset 0 -0.5px 1px rgba(15, 23, 42, 0.04),
            0 1px 6px rgba(37, 99, 235, 0.05);
    }

    .mobile-bottom-nav__item--plus .mobile-bottom-nav__lens {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        color: #fff;
        background: rgba(37, 99, 235, 0.52);
        box-shadow:
            inset 0 0.5px 0 rgba(255, 255, 255, 0.4),
            0 4px 12px rgba(37, 99, 235, 0.18);
        backdrop-filter: blur(12px) saturate(160%);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
    }

    .mobile-bottom-nav__item--plus .mobile-bottom-nav__label {
        color: var(--brand-dark);
    }

    .mobile-bottom-nav__item--plus .mobile-bottom-nav__lens i {
        font-size: 1.35rem;
        font-weight: 600;
    }

    @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
        .mobile-bottom-nav {
            background: rgba(255, 255, 255, 0.94);
        }

        .nav-toggle,
        .topbar-end .btn-logout {
            background: #fff;
        }

        .mobile-bottom-nav__item--plus .mobile-bottom-nav__lens {
            background: var(--brand);
        }
    }

    @media (prefers-reduced-transparency: reduce) {
        .mobile-bottom-nav {
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }

        .nav-toggle,
        .topbar-end .btn-logout {
            background: #fff;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
    }

    .quick-sheet {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1050;
    }

    body.sheet-open .quick-sheet { display: block; }

    .quick-sheet__backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.45);
    }

    .quick-sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.16);
        border-radius: 22px 22px 0 0;
        padding: 0.7rem 1rem calc(1rem + env(safe-area-inset-bottom));
        border: 0.5px solid rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(28px) saturate(170%);
        -webkit-backdrop-filter: blur(28px) saturate(170%);
        box-shadow:
            0 -12px 30px rgba(15, 23, 42, 0.1),
            inset 0 0.5px 0 rgba(255, 255, 255, 0.5);
    }

    .quick-sheet__handle {
        width: 42px;
        height: 4px;
        border-radius: 99px;
        background: #cbd5e1;
        margin: 0.2rem auto 0.9rem;
    }

    .quick-sheet__panel h2 {
        font-size: 1rem;
        margin-bottom: 0.85rem;
    }

    .quick-sheet__option {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        text-decoration: none;
        color: var(--ink);
        border: 0.5px solid var(--line);
        border-radius: 14px;
        padding: 0.85rem 0.95rem;
        margin-bottom: 0.55rem;
        background: var(--glass-mid);
        backdrop-filter: blur(14px) saturate(150%);
        -webkit-backdrop-filter: blur(14px) saturate(150%);
        box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.45);
    }

    .quick-sheet__option i {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: grid;
        place-items: center;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .quick-sheet__option strong { display: block; }
    .quick-sheet__option small { color: var(--ink-soft); }
    .quick-sheet__option--income i { background: #d1fae5; color: var(--income); }
    .quick-sheet__option--expense i { background: #ffe4e6; color: var(--expense); }
    .quick-sheet__option--transfer i { background: #e0f2fe; color: #0369a1; }

    .table { font-size: 0.9rem; }
    .card { padding: 1rem; }
    .filters { padding: 0.85rem; }
}

@media (max-width: 576px) {
    .kpi .value { font-size: 1.05rem; }
    .tx-launch__btn small { display: none; }
}

.tx-index-head {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tx-index-head .tx-kpis {
    flex: 1;
    min-width: 0;
}

.tx-add {
    flex-shrink: 0;
    min-width: 88px;
    padding: 0.55rem 0.7rem;
}

.tx-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tx-kpi,
.tx-item,
.ac-kpi,
.ac-card {
    background: var(--glass);
    border: 0.5px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.tx-kpi {
    border-radius: 16px;
    padding: 0.9rem 0.75rem;
    min-width: 0;
    overflow: hidden;
}

.tx-kpi span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.tx-kpi strong { font-size: 1.2rem; }
.tx-filters__summary {
    display: none;
}

@media (min-width: 993px) {
    .tx-filters > .tx-filters__body {
        display: block !important;
    }
}

.tx-list {
    display: none;
}

.tx-item {
    border-radius: 16px;
    padding: 0.9rem;
}

.tx-item__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.tx-item__head time {
    color: var(--ink-soft);
    font-size: 0.8rem;
    text-align: right;
    line-height: 1.3;
}

.tx-item__body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tx-item__info {
    min-width: 0;
}

.tx-item__info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx-item__info span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.tx-item__amount {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

.tx-item__actions {
    display: flex;
    gap: 0.45rem;
    min-width: 0;
}

.tx-item__actions form {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.tx-item__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.tx-pager .pagination {
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .tx-launch { display: none; }
    .tx-add { display: none; }

    .tx-kpis { gap: 0.45rem; }

    .tx-kpi {
        padding: 0.65rem 0.55rem;
        border-radius: 14px;
    }

    .tx-kpi span { font-size: 0.7rem; }
    .tx-kpi strong { font-size: clamp(0.78rem, 3.4vw, 1rem); word-break: break-word; }

    .tx-table-wrap { display: none; }

    .tx-list {
        display: grid;
        gap: 0.7rem;
    }

    .tx-filters {
        padding: 0;
    }

    .tx-filters__summary {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        list-style: none;
        cursor: pointer;
        padding: 0.85rem 1rem;
        font-weight: 600;
    }

    .tx-filters__summary::-webkit-details-marker { display: none; }

    .tx-filters__chevron {
        margin-left: auto;
        transition: transform 0.15s ease;
    }

    .tx-filters[open] .tx-filters__chevron {
        transform: rotate(180deg);
    }

    .tx-filters__body {
        padding: 0 1rem 1rem;
    }
}

.tx-launch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tx-launch__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    min-width: 0;
    text-decoration: none;
    color: var(--ink);
    background: var(--glass);
    border: 0.5px solid var(--line);
    border-radius: 16px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow);
    padding: 0.85rem 0.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tx-launch__btn:hover {
    transform: translateY(-2px);
    color: var(--ink);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.tx-launch__btn i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tx-launch__btn span {
    min-width: 0;
    overflow: hidden;
}

.tx-launch__btn strong,
.tx-launch__btn small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx-launch__btn small { color: var(--ink-soft); }

.tx-launch__btn--income i { background: #d1fae5; color: var(--income); }
.tx-launch__btn--expense i { background: #ffe4e6; color: var(--expense); }
.tx-launch__btn--transfer i { background: #e0f2fe; color: #0369a1; }
.tx-launch__btn--income:hover { border-color: #6ee7b7; }
.tx-launch__btn--expense:hover { border-color: #fda4af; }
.tx-launch__btn--transfer:hover { border-color: #7dd3fc; }

.dash-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.dash-actions .btn {
    width: 100%;
    min-height: 72px;
    padding: 0.65rem 0.4rem;
}

@media (max-width: 576px) {
    .dash-actions {
        grid-template-columns: 1fr;
    }
}

.tx-submit {
    white-space: normal;
}

.tx-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx-badge--income { background: rgba(209, 250, 229, 0.45); color: var(--income); }
.tx-badge--expense { background: rgba(255, 228, 230, 0.5); color: var(--expense); }
.tx-badge--transfer { background: rgba(224, 242, 254, 0.5); color: #0369a1; }

.tx-composer {
    --tx-accent: var(--expense);
    --tx-accent-soft: #fff1f2;
    max-width: 820px;
}

.tx-composer[data-type="income"] {
    --tx-accent: var(--income);
    --tx-accent-soft: #ecfdf5;
}

.tx-composer[data-type="expense"] {
    --tx-accent: var(--expense);
    --tx-accent-soft: #fff1f2;
}

.tx-composer[data-type="transfer"] {
    --tx-accent: #0369a1;
    --tx-accent-soft: #f0f9ff;
}

.tx-type-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tx-type-card,
.tx-chip,
.tx-account-card {
    position: relative;
    cursor: pointer;
}

.tx-type-card input,
.tx-chip input,
.tx-account-card input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.tx-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    overflow: hidden;
    background: var(--glass);
    border: 0.5px solid var(--line);
    border-radius: 18px;
    padding: 0.85rem 0.35rem;
    text-align: center;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.tx-type-card:hover { transform: translateY(-1px); }
.tx-type-card strong {
    font-size: clamp(0.7rem, 2.6vw, 0.95rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.tx-type-card small { color: var(--ink-soft); font-size: 0.75rem; }

.tx-type-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
}

.tx-type-card--income .tx-type-card__icon { background: rgba(209, 250, 229, 0.45); color: var(--income); }
.tx-type-card--expense .tx-type-card__icon { background: rgba(255, 228, 230, 0.5); color: var(--expense); }
.tx-type-card--transfer .tx-type-card__icon { background: rgba(224, 242, 254, 0.5); color: #0369a1; }

.tx-type-card:has(input:checked) {
    border-color: var(--tx-accent);
}

.tx-type-card--income:has(input:checked) { border-color: var(--income); background: rgba(236, 253, 245, 0.42); }
.tx-type-card--expense:has(input:checked) { border-color: var(--expense); background: rgba(255, 241, 242, 0.45); }
.tx-type-card--transfer:has(input:checked) { border-color: #0369a1; background: rgba(240, 249, 255, 0.45); }

.tx-panel {
    background: var(--glass);
    border: 0.5px solid var(--line);
    border-radius: 18px;
    padding: 1.1rem 1.15rem 1.2rem;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    margin-bottom: 0.9rem;
}

.tx-panel__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.75rem;
}

.tx-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.55rem;
    background: color-mix(in srgb, var(--tx-accent-soft) 55%, transparent);
    border: 0.5px dashed var(--line);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-radius: 16px;
    padding: 1.1rem 1rem;
}

.tx-amount__currency {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tx-accent);
}

.tx-amount__input {
    width: min(280px, 70%);
    border: 0;
    background: transparent;
    font-size: clamp(2rem, 6vw, 2.7rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    outline: none;
    text-align: left;
}

.tx-amount__input::-webkit-outer-spin-button,
.tx-amount__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tx-amount__input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.tx-amount__hint {
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.86rem;
    margin: 0.75rem 0 0;
}

.tx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0.5px solid var(--line);
    background: var(--glass-mid);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    color: var(--ink);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.45);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tx-chip i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--chip-color, #64748b);
    display: inline-block;
}

.tx-chip:has(input:checked) {
    border-color: var(--chip-color, var(--tx-accent));
    background: color-mix(in srgb, var(--tx-accent-soft) 50%, transparent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.tx-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
}

.tx-account-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    border: 0.5px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 0.8rem;
    background: var(--glass-mid);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tx-account-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1rem;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.5);
}

.tx-account-card__icon--cash { background: rgba(220, 252, 231, 0.45); color: #166534; }
.tx-account-card__icon--bank { background: rgba(219, 234, 254, 0.5); color: var(--brand-dark); }
.tx-account-card__icon--card { background: rgba(254, 243, 199, 0.5); color: #b45309; }
.tx-account-card__icon--wallet { background: rgba(224, 231, 255, 0.5); color: #3730a3; }
.tx-account-card__icon--other { background: rgba(226, 232, 240, 0.45); color: #334155; }

.tx-account-card__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.tx-account-card__meta strong {
    font-size: 0.9rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx-account-card small { color: var(--ink-soft); }
.tx-account-card:has(input:checked) {
    border-color: var(--tx-accent);
    background: color-mix(in srgb, var(--tx-accent-soft) 50%, transparent);
}

.tx-meta {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0.9rem;
}

.tx-date-row {
    display: grid;
    gap: 0.6rem;
}

.tx-datetime-fields {
    display: grid;
    gap: 0.5rem;
}

.tx-time-picker {
    display: grid;
    grid-template-columns: minmax(4.2rem, 1fr) auto minmax(4.6rem, 1fr) minmax(5.4rem, 1.1fr);
    gap: 0.3rem;
    align-items: center;
}

.tx-time-picker .form-select {
    min-width: 0;
    padding-left: 0.45rem;
    padding-right: 1.6rem;
}

.tx-time-picker__sep {
    color: var(--ink-soft);
    font-weight: 700;
}

.tx-date-chips {
    display: flex;
    gap: 0.45rem;
}

.tx-date-chip {
    border: 0.5px solid var(--line);
    background: var(--glass-mid);
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.tx-date-chip.is-active {
    border-color: var(--tx-accent);
    background: color-mix(in srgb, var(--tx-accent-soft) 50%, transparent);
    color: var(--tx-accent);
    font-weight: 600;
}

.tx-empty {
    color: var(--ink-soft);
    background: var(--glass);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border: 0.5px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tx-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.tx-submit {
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    white-space: normal;
}

.tx-submit:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .tx-meta {
        grid-template-columns: 1fr;
    }

    .tx-type-switch {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .tx-type-card {
        padding: 0.7rem 0.3rem;
    }

    .tx-type-card small { display: none; }
    .tx-type-card__icon { width: 36px; height: 36px; margin-bottom: 0.1rem; }
    .tx-submit { width: 100%; }
    .tx-actions-bar .btn-light { width: 100%; }
}

.ac-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.ac-kpi {
    border-radius: 16px;
    padding: 0.85rem 1rem;
    min-width: 0;
    flex: 1;
}

.ac-kpi span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.ac-kpi strong {
    font-size: clamp(1.15rem, 4vw, 1.45rem);
    word-break: break-word;
}

.ac-add {
    flex-shrink: 0;
    min-width: 96px;
    padding: 0.55rem 0.75rem;
}

.ac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.ac-card {
    border-radius: 18px;
    padding: 1rem;
    min-width: 0;
}

.ac-card.is-inactive {
    opacity: 0.72;
}

.ac-card__top {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.ac-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.5);
}

.ac-card__icon--cash { background: rgba(220, 252, 231, 0.45); color: #166534; }
.ac-card__icon--bank { background: rgba(219, 234, 254, 0.5); color: var(--brand-dark); }
.ac-card__icon--card { background: rgba(254, 243, 199, 0.5); color: #b45309; }
.ac-card__icon--wallet { background: rgba(224, 231, 255, 0.5); color: #3730a3; }
.ac-card__icon--other { background: rgba(226, 232, 240, 0.45); color: #334155; }

.ac-card__title {
    min-width: 0;
    flex: 1;
}

.ac-card__title strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-card__title span {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.ac-status {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.ac-status.is-on { background: #d1fae5; color: var(--income); }
.ac-status.is-off { background: #e2e8f0; color: #64748b; }

.ac-card__balances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    background: var(--glass);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.85rem;
    border: 0.5px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ac-card__balances span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.ac-card__balances strong {
    word-break: break-word;
    font-size: 0.95rem;
}

.ac-card__current { color: var(--brand-dark); }

.ac-card__actions {
    display: flex;
    gap: 0.45rem;
    min-width: 0;
}

.ac-card__actions form {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.ac-card__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.ac-form {
    max-width: 640px;
}

.ac-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .ac-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ac-add,
    .ac-form__actions .btn {
        width: 100%;
    }

    .ac-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 993px) {
    .content {
        padding: 1.75rem 2rem 2.25rem;
    }

    .kpi .value {
        font-size: 1.45rem;
        word-break: normal;
    }

    .kpi-row:not(.sk-kpi-row--3) {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1rem;
    }

    .kpi-row .kpi .value {
        font-size: 1.2rem;
    }

    .kpi-row .kpi .label {
        font-size: 0.78rem;
    }

    .btn {
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .btn-stack {
        flex-direction: row;
        gap: 0.45rem;
        white-space: nowrap;
        padding: 0.5rem 0.95rem;
    }

    .btn-stack i {
        font-size: 1rem;
    }

    .btn-stack span {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .btn-stack.btn-sm {
        padding: 0.3rem 0.65rem;
    }

    .btn-stack.btn-sm span {
        font-size: 0.8rem;
    }

    .btn-actions .btn,
    .btn-actions .btn.btn-stack,
    .btn-action {
        min-height: 44px;
        padding: 0.55rem 1rem;
    }

    .tx-index-head {
        align-items: center;
    }

    .tx-add {
        align-self: center;
        min-width: auto;
        min-height: 48px;
        padding: 0.7rem 1.15rem;
    }

    .ac-add {
        min-width: auto;
        padding: 0.55rem 1rem;
        align-self: center;
    }

    .ac-card__actions .btn,
    .tx-item__actions .btn,
    .ac-card__actions form {
        flex: 0 0 auto;
        width: auto;
    }

    .tx-type-card {
        padding: 1rem 0.7rem;
    }

    .tx-type-card strong {
        font-size: 0.95rem;
    }

    .filters .btn-stack {
        width: auto;
    }
}

.content-stage {
    position: relative;
    min-height: 12rem;
}

html.sk-pending .content-main {
    visibility: hidden;
}

.sk-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 12;
    padding-bottom: 0.5rem;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.55);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.sk-overlay:not([hidden]) {
    display: block;
}

.sk-overlay .sk-panel {
    display: none;
}

.sk-overlay[data-sk-kind="dashboard"] [data-sk-panel="dashboard"],
.sk-overlay[data-sk-kind="list"] [data-sk-panel="list"],
.sk-overlay[data-sk-kind="cards"] [data-sk-panel="cards"],
.sk-overlay[data-sk-kind="form"] [data-sk-panel="form"] {
    display: block;
}

.sk-block {
    display: block;
    background-color: #e8edf5;
    background-image: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
    background-size: 220% 100%;
    animation: sk-shimmer 1.4s ease-in-out infinite;
    animation-delay: var(--sk-delay, 0s);
    border-radius: 8px;
}

.sk-line {
    height: 0.7rem;
    width: 58%;
    margin-bottom: 0.55rem;
}

.sk-line--sm { height: 0.55rem; width: 42%; }
.sk-line--md { height: 0.75rem; width: 36%; }
.sk-line--lg { height: 1.15rem; width: 72%; margin-bottom: 0; }

.sk-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
}

.sk-badge {
    width: 4.5rem;
    height: 1.35rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.sk-chip {
    width: 5.2rem;
    height: 2rem;
    border-radius: 999px;
}

.sk-chip--wide { width: 7.5rem; }

.sk-btn {
    width: 8.5rem;
    height: 2.6rem;
    border-radius: 12px;
}

.sk-btn--wide {
    width: 12.5rem;
    height: 2.85rem;
    border-radius: 12px;
    margin-top: 0.35rem;
}

.sk-input {
    height: 2.5rem;
    width: 100%;
    border-radius: 10px;
    margin-top: 0.55rem;
}

.sk-amount {
    height: 3.1rem;
    width: min(16rem, 70%);
    border-radius: 14px;
    margin-top: 0.7rem;
}

.sk-kpi--income .sk-line--lg,
.sk-kpi--income .sk-icon { background-color: #d1fae5; }
.sk-kpi--expense .sk-line--lg,
.sk-kpi--expense .sk-icon { background-color: #ffe4e6; }
.sk-kpi--week .sk-line--lg,
.sk-kpi--week .sk-icon { background-color: #ffedd5; }
.sk-kpi--balance .sk-line--lg,
.sk-kpi--balance .sk-icon { background-color: #dbeafe; }
.sk-kpi--net .sk-line--lg,
.sk-kpi--net .sk-icon { background-color: #e0e7ff; }

.sk-card { margin-bottom: 0.85rem; }
.sk-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
}

.sk-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

.sk-row:last-child { border-bottom: 0; }
.sk-row .sk-line { margin-bottom: 0; }

.sk-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0.85rem 0;
}

.sk-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    height: 150px;
    margin-top: 1.1rem;
    padding: 0 0.25rem;
}

.sk-bars span {
    flex: 1;
    height: var(--h, 50%);
    border-radius: 8px 8px 4px 4px;
    background-color: #e8edf5;
    background-image: linear-gradient(180deg, #dbeafe, #e8edf5);
    animation: sk-pulse 1.3s ease-in-out infinite;
    animation-delay: var(--sk-delay, 0s);
}

.sk-bars span:nth-child(odd) {
    background-image: linear-gradient(180deg, #d1fae5, #e8edf5);
}

.sk-donut {
    width: 150px;
    height: 150px;
    margin: 1.4rem auto 0.4rem;
    border-radius: 50%;
    background:
        conic-gradient(#dbeafe 0 38%, #ffe4e6 38% 64%, #d1fae5 64% 82%, #e0e7ff 82% 100%);
    mask: radial-gradient(circle, transparent 58%, #000 60%);
    -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%);
    animation: sk-pulse 1.4s ease-in-out infinite;
}

.sk-kpi-row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0.85rem;
}

.sk-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.sk-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.sk-account .sk-row:first-child { padding-top: 0; }
.sk-item { margin-bottom: 0.65rem; }
.sk-item .sk-row { border: 0; padding: 0 0 0.45rem; }

.sk-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.sk-type {
    height: 4.6rem;
    border-radius: 16px;
}

.sk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.sk-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.sk-chart {
    position: relative;
    min-height: 180px;
}

.sk-chart--donut { min-height: 220px; }

.sk-chart canvas {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.sk-chart.is-ready canvas { opacity: 1; }

.sk-chart__ghost {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    padding: 0.4rem 0.2rem;
    transition: opacity 0.3s ease;
}

.sk-chart--bars .sk-chart__ghost span {
    flex: 1;
    height: var(--h, 50%);
    border-radius: 8px 8px 4px 4px;
    background-image: linear-gradient(180deg, #dbeafe, #e8edf5);
    animation: sk-pulse 1.3s ease-in-out infinite;
}

.sk-chart--bars .sk-chart__ghost span:nth-child(even) {
    background-image: linear-gradient(180deg, #fecdd3, #e8edf5);
}

.sk-chart--donut .sk-chart__ghost {
    align-items: center;
    justify-content: center;
}

.sk-chart.is-ready .sk-chart__ghost {
    opacity: 0;
    pointer-events: none;
}

@keyframes sk-shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -40% 0; }
}

@keyframes sk-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@media (min-width: 768px) {
    .sk-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sk-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 993px) {
    .sk-split {
        grid-template-columns: 1.7fr 1fr;
    }

    .sk-kpi-row--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .sk-block,
    .sk-bars span,
    .sk-donut,
    .sk-chart__ghost span {
        animation: none;
    }

    .sk-chart canvas {
        opacity: 1;
        transition: none;
    }
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.profile-card,
.profile-help {
    height: 100%;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.avatar-picker__preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.avatar-picker__icons,
.avatar-picker__colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.avatar-icon-option,
.avatar-color-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.avatar-icon-option input,
.avatar-color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.avatar-icon-option span,
.avatar-color-option span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.55);
    color: #334155;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-color-option span {
    border-radius: 50%;
}

.avatar-icon-option input:checked + span,
.avatar-color-option input:checked + span {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.avatar-icon-option input:focus-visible + span,
.avatar-color-option input:focus-visible + span {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .topbar,
    .card,
    .auth-card,
    .install-card,
    .tx-kpi,
    .tx-item,
    .ac-kpi,
    .ac-card,
    .tx-panel,
    .filters,
    .form-control,
    .form-select {
        background: rgba(255, 255, 255, 0.94);
    }

    .btn-brand,
    .tx-submit {
        background: var(--brand);
    }
}

.pwa-install {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: var(--glass-strong);
    border: 0.5px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.pwa-install__copy {
    min-width: 0;
    flex: 1;
}

.pwa-install__copy strong,
.pwa-install__copy small {
    display: block;
}

.pwa-install__copy small {
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.pwa-install__button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.pwa-install__dismiss {
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-body .pwa-install,
.install-body .pwa-install {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 993px) {
    .pwa-install {
        left: auto;
        right: 1.5rem;
        bottom: 1.5rem;
        width: min(420px, calc(100vw - 3rem));
    }
}

@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top, 0px);
    }
}
