body {
    min-height: 100vh;
    background: #f6f3ee;
    color: #17211f;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-shell {
    --sidebar-width: clamp(232px, 20vw, 280px);
    --sidebar-collapsed-width: 78px;
    --sidebar-padding: clamp(12px, 1.4vw, 18px);
    --sidebar-link-height: clamp(38px, 5.5vh, 44px);
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(58, 141, 114, 0.12), transparent 32rem),
        linear-gradient(135deg, #faf8f3 0%, #eef5f1 100%);
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    min-height: 100vh;
    background: #17211f;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 18px 0 45px rgba(23, 33, 31, 0.16);
    transition: width 0.2s ease;
}

.sidebar-brand {
    padding: clamp(16px, 2vw, 24px);
    display: flex;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-copy {
    min-width: 0;
    flex: 1;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #f4b24f;
    color: #17211f;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: 0;
}

.sidebar-brand h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.sidebar-brand small {
    color: #b7c7c0;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbe7e1;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.sidebar-menu {
    list-style: none;
    padding: var(--sidebar-padding);
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: clamp(4px, 0.8vh, 7px);
}

.sidebar-menu a,
.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: var(--sidebar-link-height);
    color: #dbe7e1;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-menu a span:not(.nav-icon),
.logout-btn span:not(.nav-icon),
.brand-copy {
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active,
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4b24f;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    font-size: 16px;
    font-weight: 800;
}

.nav-icon i {
    line-height: 1;
}

.sidebar-menu a.active .nav-icon {
    background: #f4b24f;
    color: #17211f;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: clamp(10px, 1.6vh, 16px) 4px;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: margin-left 0.2s ease, width 0.2s ease;
}

.app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.app-shell.sidebar-collapsed .sidebar-brand {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding-inline: 12px;
}

.app-shell.sidebar-collapsed .brand-copy {
    opacity: 0;
    visibility: hidden;
    width: 0;
    flex: 0;
    overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
    position: static;
}

.app-shell.sidebar-collapsed .sidebar-menu {
    padding-inline: 12px;
}

.app-shell.sidebar-collapsed .sidebar-menu a,
.app-shell.sidebar-collapsed .logout-btn {
    justify-content: center;
    gap: 0;
    padding-inline: 8px;
}

.app-shell.sidebar-collapsed .sidebar-menu a span:not(.nav-icon),
.app-shell.sidebar-collapsed .logout-btn span:not(.nav-icon) {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
}

.app-shell.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.mobile-menu-toggle {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

body.mobile-sidebar-open {
    overflow: hidden;
}

.topbar {
    min-height: 86px;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(23, 33, 31, 0.08);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-kicker {
    margin: 0 0 3px;
    color: #668078;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 0;
    color: #17211f;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.quote-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, 32vw);
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid rgba(23, 33, 31, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: #2b3a36;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.quote-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(58, 141, 114, 0.12);
    color: #2f735d;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    font-size: 15px;
}

.date-time-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 14px 8px 8px;
    border: 1px solid rgba(23, 33, 31, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.08);
}

.date-time-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(244, 178, 79, 0.18);
    color: #9a650d;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    font-size: 18px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(23, 33, 31, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.08);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #3a8d72;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.user-chip small,
.date-time-chip small,
.user-chip strong {
    display: block;
    line-height: 1.2;
}

.user-chip small,
.date-time-chip small {
    color: #668078;
    font-size: 12px;
}

.date-time-chip strong {
    color: #17211f;
    display: block;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.content-area {
    padding: 30px 32px 42px;
}

.dashboard-hero {
    min-height: 220px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
    gap: 24px;
    padding: 30px;
    margin-bottom: 22px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 33, 31, 0.94), rgba(39, 73, 62, 0.92)),
        #17211f;
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(23, 33, 31, 0.14);
}

.dashboard-eyebrow {
    color: #f4b24f;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-hero h2 {
    max-width: 720px;
    margin: 10px 0 10px;
    font-size: 42px;
    line-height: 1.08;
    font-weight: 800;
}

.dashboard-hero p {
    max-width: 620px;
    margin: 0;
    color: #c9d8d2;
    font-size: 16px;
    line-height: 1.6;
}

.hero-balance-card {
    padding: 22px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-icon,
.stat-icon,
.panel-icon,
.list-icon {
    display: grid;
    place-items: center;
    border-radius: 8px;
}

.hero-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    background: #f4b24f;
    color: #17211f;
    font-size: 22px;
}

.hero-balance-card small,
.hero-balance-card strong {
    display: block;
}

.hero-balance-card small {
    color: #c9d8d2;
    font-size: 13px;
    font-weight: 700;
}

.hero-balance-card strong {
    margin-top: 8px;
    font-size: 26px;
    line-height: 1.15;
}

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

.quick-actions a {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(23, 33, 31, 0.08);
    color: #17211f;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.06);
}

.quick-actions a:hover {
    color: #ffffff;
    background: #3a8d72;
}

.quick-actions i {
    color: #f4b24f;
    font-size: 18px;
}

.quick-actions a:hover i {
    color: #ffffff;
}

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

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(23, 33, 31, 0.08);
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.07);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 126px;
}

.stat-card .label {
    color: #668078;
    font-size: 14px;
    font-weight: 700;
}

.stat-card .value {
    color: #17211f;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    margin-top: 8px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    font-size: 19px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
}

.stat-expense .stat-icon,
.stat-pending .stat-icon {
    background: rgba(211, 107, 84, 0.12);
    color: #d36b54;
}

.stat-cash .stat-icon,
.stat-saving .stat-icon {
    background: rgba(244, 178, 79, 0.16);
    color: #9b6815;
}

.stat-loan .stat-icon,
.stat-worth .stat-icon {
    background: rgba(109, 127, 179, 0.12);
    color: #596da9;
}

.card-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(23, 33, 31, 0.08);
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.07);
}

.budget-warning-panel {
    margin-bottom: 22px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: 22px;
    margin-bottom: 22px;
}

.dashboard-grid-balanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-panel,
.list-panel,
.transactions-panel {
    min-width: 0;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-heading h3 {
    margin: 0;
    color: #17211f;
    font-size: 18px;
    font-weight: 800;
}

.panel-heading small {
    color: #668078;
    font-weight: 700;
}

.panel-heading a {
    color: #2f735d;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.panel-heading a:hover {
    text-decoration: underline;
}

.panel-icon {
    width: 38px;
    height: 38px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
    font-size: 18px;
}

.panel-icon-warning {
    background: rgba(211, 107, 84, 0.12);
    color: #d36b54;
}

.chart-wrap {
    position: relative;
    height: 320px;
}

.chart-wrap-small {
    height: 270px;
}

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

.finance-list-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(23, 33, 31, 0.08);
    background: #fbfaf7;
}

.list-icon {
    width: 42px;
    height: 42px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
}

.list-icon.warning {
    background: rgba(211, 107, 84, 0.12);
    color: #d36b54;
}

.finance-list-item strong,
.finance-list-item small {
    display: block;
}

.finance-list-item strong {
    color: #17211f;
    font-weight: 800;
}

.finance-list-item small {
    color: #668078;
    margin-top: 2px;
}

.finance-list-item.unread-notification {
    border-color: rgba(58, 141, 114, 0.28);
    background: rgba(58, 141, 114, 0.08);
}

.amount {
    color: #2f735d;
    font-weight: 800;
    white-space: nowrap;
}

.amount.negative {
    color: #b94733;
}

.empty-state {
    min-height: 190px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 24px;
    border-radius: 8px;
    background: #fbfaf7;
    color: #668078;
    text-align: center;
}

.empty-state i {
    color: #3a8d72;
    font-size: 32px;
}

.empty-state strong {
    color: #17211f;
    font-size: 16px;
}

.empty-state span {
    max-width: 280px;
    font-size: 13px;
}

.dashboard-table {
    margin-bottom: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 760px;
}

.dashboard-table th {
    color: #668078;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom-color: rgba(23, 33, 31, 0.1);
}

.dashboard-table td {
    color: #2b3a36;
    border-bottom-color: rgba(23, 33, 31, 0.07);
}

.amount-cell {
    color: #17211f;
    font-weight: 800;
    white-space: nowrap;
}

.type-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(109, 127, 179, 0.12);
    color: #596da9;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.type-income,
.type-loan_repayment {
    background: rgba(58, 141, 114, 0.12);
    color: #2f735d;
}

.type-expense,
.type-loan_given {
    background: rgba(211, 107, 84, 0.12);
    color: #b94733;
}

.empty-state-table {
    min-height: 220px;
}

.profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 33, 31, 0.94), rgba(39, 73, 62, 0.92)),
        #17211f;
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(23, 33, 31, 0.14);
}

.profile-avatar-large {
    width: 78px;
    height: 78px;
    border-radius: 8px;
    background: #f4b24f;
    color: #17211f;
    display: grid;
    place-items: center;
    flex: 0 0 78px;
    font-size: 32px;
    font-weight: 800;
}

.profile-identity h2 {
    margin: 8px 0 8px;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
}

.profile-identity p {
    margin: 0;
    color: #c9d8d2;
}

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

.profile-summary div {
    padding: 22px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(23, 33, 31, 0.08);
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.07);
}

.profile-summary span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 8px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
    font-size: 19px;
}

.profile-summary small,
.profile-summary strong {
    display: block;
}

.profile-summary small {
    color: #668078;
    font-weight: 700;
}

.profile-summary strong {
    margin-top: 8px;
    color: #17211f;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 800;
}

.profile-layout {
    display: grid;
    gap: 22px;
}

.profile-card {
    padding: 24px;
}

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

.profile-field {
    display: grid;
    gap: 7px;
}

.profile-field .form-label {
    margin: 0;
    color: #2b3a36;
    font-size: 13px;
    font-weight: 800;
}

.profile-field input,
.profile-field select,
.profile-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(23, 33, 31, 0.16);
    border-radius: 8px;
    background: #fbfaf7;
    color: #17211f;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
    border-color: #3a8d72;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 141, 114, 0.12);
}

.profile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
}

.profile-actions h3 {
    margin: 0 0 4px;
    color: #17211f;
    font-size: 18px;
    font-weight: 800;
}

.profile-actions p {
    margin: 0;
    color: #668078;
}

.profile-save-btn {
    width: auto;
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 18px;
}

.page-hero {
    min-height: 220px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
    gap: 24px;
    padding: 30px;
    margin-bottom: 22px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 33, 31, 0.94), rgba(39, 73, 62, 0.92)),
        #17211f;
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(23, 33, 31, 0.14);
}

.page-hero h2 {
    max-width: 720px;
    margin: 10px 0 10px;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 800;
}

.page-hero p {
    max-width: 620px;
    margin: 0;
    color: #c9d8d2;
    font-size: 16px;
    line-height: 1.6;
}

.account-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.account-filter {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px auto;
    gap: 14px;
    align-items: end;
}

.filter-field {
    display: grid;
    gap: 7px;
}

.filter-field label {
    color: #2b3a36;
    font-size: 13px;
    font-weight: 800;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #668078;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(23, 33, 31, 0.16);
    border-radius: 8px;
    background: #fbfaf7;
    color: #17211f;
    outline: none;
}

.input-with-icon input {
    padding-left: 38px;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: #3a8d72;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 141, 114, 0.12);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-actions .btn,
.add-account-btn,
.soft-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.soft-btn {
    border: 1px solid rgba(23, 33, 31, 0.1);
    background: #fbfaf7;
    color: #2b3a36;
}

.soft-btn:hover {
    border-color: rgba(58, 141, 114, 0.35);
    color: #2f735d;
}

.add-account-btn {
    padding-inline: 16px;
    border: none;
    background: #17211f;
    color: #ffffff;
}

.add-account-btn:hover {
    background: #3a8d72;
    color: #ffffff;
}

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

.account-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(23, 33, 31, 0.08);
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.07);
}

.account-card-top,
.account-actions,
.account-meta span,
.status-pill {
    display: flex;
    align-items: center;
}

.account-card-top {
    justify-content: space-between;
    gap: 12px;
}

.account-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
    font-size: 22px;
}

.status-pill {
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.active {
    background: rgba(58, 141, 114, 0.12);
    color: #2f735d;
}

.status-pill.inactive {
    background: rgba(102, 128, 120, 0.12);
    color: #668078;
}

.account-card-body h3 {
    margin: 0 0 6px;
    color: #17211f;
    font-size: 22px;
    line-height: 1.18;
    font-weight: 800;
}

.account-card-body p {
    margin: 0;
    color: #668078;
}

.account-card-body strong {
    display: block;
    margin-top: 18px;
    color: #17211f;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
}

.account-meta {
    display: grid;
    gap: 9px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(23, 33, 31, 0.08);
}

.account-meta span {
    gap: 8px;
    min-width: 0;
    color: #668078;
    font-size: 13px;
    font-weight: 700;
}

.account-meta i {
    color: #3a8d72;
}

.account-actions {
    gap: 8px;
}

.account-actions a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fbfaf7;
    border: 1px solid rgba(23, 33, 31, 0.08);
    color: #2f735d;
    text-decoration: none;
}

.account-actions a:hover {
    background: #3a8d72;
    color: #ffffff;
}

.account-actions a.danger {
    color: #b94733;
}

.account-actions a.danger:hover {
    background: #d36b54;
    color: #ffffff;
}

.account-empty {
    grid-column: 1 / -1;
    min-height: 320px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    text-align: center;
}

.account-empty > i {
    color: #3a8d72;
    font-size: 42px;
}

.account-empty strong {
    color: #17211f;
    font-size: 20px;
}

.account-empty span {
    color: #668078;
}

.account-empty .btn {
    width: auto;
    min-width: 160px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modern-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.modern-pagination a,
.modern-pagination span,
.modern-pagination strong {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(23, 33, 31, 0.08);
    color: #17211f;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(23, 33, 31, 0.06);
}

.modern-pagination a:hover {
    background: #3a8d72;
    color: #ffffff;
}

.modern-pagination .disabled {
    color: #9aa8a3;
    box-shadow: none;
}

.finance-form-layout {
    display: grid;
    gap: 22px;
}

.finance-form-card {
    padding: 24px;
}

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

.finance-field {
    display: grid;
    gap: 7px;
}

.finance-field-full {
    grid-column: 1 / -1;
}

.finance-field .form-label {
    margin: 0;
    color: #2b3a36;
    font-size: 13px;
    font-weight: 800;
}

.finance-field input,
.finance-field select,
.finance-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(23, 33, 31, 0.16);
    border-radius: 8px;
    background: #fbfaf7;
    color: #17211f;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.finance-field textarea {
    min-height: 112px;
    resize: vertical;
}

.finance-field input:focus,
.finance-field select:focus,
.finance-field textarea:focus {
    border-color: #3a8d72;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 141, 114, 0.12);
}

.input-prefix {
    position: relative;
}

.input-prefix span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #668078;
    font-weight: 800;
    pointer-events: none;
}

.input-prefix input {
    padding-left: 44px;
}

.budget-period-grid {
    max-width: 520px;
}

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

.budget-amount-cell {
    max-width: 220px;
}

.budget-amount-cell input {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(23, 33, 31, 0.16);
    border-radius: 8px;
    background: #fbfaf7;
    color: #17211f;
    outline: none;
}

.budget-amount-cell input:focus {
    border-color: #3a8d72;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 141, 114, 0.12);
}

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

.insight-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid rgba(23, 33, 31, 0.08);
    border-radius: 8px;
    background: #fbfaf7;
}

.insight-item h3 {
    margin: 0 0 6px;
    color: #17211f;
    font-size: 16px;
    font-weight: 800;
}

.insight-item p {
    margin: 0;
    color: #668078;
    line-height: 1.5;
}

.insight-meta {
    display: grid;
    justify-items: end;
    gap: 8px;
    flex: 0 0 auto;
}

.insight-meta small {
    color: #668078;
    white-space: nowrap;
}

.recommendation-list {
    margin: 0;
    padding-left: 20px;
    color: #2b3a36;
    line-height: 1.7;
}

.finance-calendar-panel .fc {
    color: #2b3a36;
}

.finance-calendar-panel .fc .fc-button-primary {
    background: #3a8d72;
    border-color: #3a8d72;
}

.toggle-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(23, 33, 31, 0.08);
    background: #fbfaf7;
    cursor: pointer;
}

.toggle-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-visual {
    width: 54px;
    height: 30px;
    padding: 3px;
    border-radius: 999px;
    background: #c9d8d2;
    transition: background-color 0.2s ease;
}

.toggle-visual::after {
    content: "";
    width: 24px;
    height: 24px;
    display: block;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(23, 33, 31, 0.2);
    transition: transform 0.2s ease;
}

.toggle-row input:checked + .toggle-visual {
    background: #3a8d72;
}

.toggle-row input:checked + .expense-toggle {
    background: #d36b54;
}

.toggle-row input:checked + .toggle-visual::after {
    transform: translateX(24px);
}

.toggle-row strong,
.toggle-row small {
    display: block;
}

.toggle-row strong {
    color: #17211f;
    font-weight: 800;
}

.toggle-row small {
    color: #668078;
    margin-top: 2px;
}

.form-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.detail-actions > div {
    display: flex;
    gap: 10px;
}

.danger-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 16px;
    border-radius: 8px;
    border: none;
    background: #d36b54;
    color: #ffffff;
    font-weight: 800;
}

.danger-btn:hover {
    background: #b94733;
    color: #ffffff;
}

.account-detail-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
    margin-bottom: 22px;
}

.account-profile-card,
.account-info-card,
.remarks-card {
    min-width: 0;
}

.detail-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(23, 33, 31, 0.08);
}

.detail-mini-grid div {
    padding: 14px;
    border-radius: 8px;
    background: #fbfaf7;
    border: 1px solid rgba(23, 33, 31, 0.08);
}

.detail-mini-grid span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
}

.detail-mini-grid small,
.detail-mini-grid strong {
    display: block;
}

.detail-mini-grid small {
    color: #668078;
    font-weight: 700;
}

.detail-mini-grid strong {
    margin-top: 4px;
    color: #17211f;
    font-weight: 800;
    overflow-wrap: anywhere;
}

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

.detail-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 8px;
    background: #fbfaf7;
    border: 1px solid rgba(23, 33, 31, 0.08);
}

.detail-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #668078;
    font-size: 13px;
    font-weight: 800;
}

.detail-list span i {
    color: #3a8d72;
}

.detail-list strong {
    color: #17211f;
    text-align: right;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.remarks-card p {
    min-height: 120px;
    margin: 0;
    padding: 16px;
    border-radius: 8px;
    background: #fbfaf7;
    border: 1px solid rgba(23, 33, 31, 0.08);
    color: #2b3a36;
    line-height: 1.65;
}

.delete-shell {
    min-height: calc(100vh - 190px);
    display: grid;
    place-items: center;
    padding: 24px 0;
}

.delete-card {
    width: 100%;
    max-width: 560px;
    padding: 34px;
    text-align: center;
}

.delete-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 8px;
    background: rgba(211, 107, 84, 0.12);
    color: #d36b54;
    font-size: 34px;
}

.delete-card h2 {
    margin: 10px 0 10px;
    color: #17211f;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
}

.delete-card p {
    max-width: 430px;
    margin: 0 auto;
    color: #668078;
    line-height: 1.6;
}

.delete-target {
    margin: 24px 0;
    padding: 16px;
    border-radius: 8px;
    background: #fbfaf7;
    border: 1px solid rgba(211, 107, 84, 0.18);
}

.delete-target small,
.delete-target strong {
    display: block;
}

.delete-target small {
    color: #668078;
    font-weight: 800;
    text-transform: uppercase;
}

.delete-target strong {
    margin-top: 6px;
    color: #17211f;
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

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

.income-filter {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(5, minmax(140px, 0.75fr)) auto;
    gap: 14px;
    align-items: end;
}

.income-filter-actions {
    min-width: 190px;
}

.transaction-filter {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px 220px auto;
    gap: 14px;
    align-items: end;
}

.transaction-filter-actions {
    min-width: 190px;
}

.category-pill,
.source-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(58, 141, 114, 0.12);
    color: #2f735d;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.source-pill {
    background: rgba(244, 178, 79, 0.16);
    color: #8a5d16;
}

.transfer-account-label {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.transfer-account-label small,
.account-holder-small,
.transfer-fee-small {
    display: block;
    color: #7a8f87;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.muted-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(102, 128, 120, 0.12);
    color: #668078;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.income-amount {
    color: #2f735d;
}

.expense-filter-btn,
.expense-add-btn {
    background: #d36b54;
    color: #ffffff;
}

.expense-filter-btn:hover,
.expense-add-btn:hover {
    background: #b94733;
    color: #ffffff;
}

.expense-add-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 16px;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.expense-category-pill {
    background: rgba(211, 107, 84, 0.12);
    color: #b94733;
}

.expense-amount {
    color: #b94733;
}

.investment-profit,
.dashboard-table td.investment-profit,
.stat-card .value.investment-profit,
.detail-mini-grid strong.investment-profit,
.detail-list strong.investment-profit {
    color: #15803d;
}

.investment-loss,
.dashboard-table td.investment-loss,
.stat-card .value.investment-loss,
.detail-mini-grid strong.investment-loss,
.detail-list strong.investment-loss {
    color: #dc2626;
}

.expense-detail-icon,
.expense-mini-icon {
    background: rgba(211, 107, 84, 0.12);
    color: #d36b54;
}

.expense-status {
    background: rgba(211, 107, 84, 0.12);
    color: #b94733;
}

.expense-detail-list span i {
    color: #d36b54;
}

.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.category-toolbar > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.category-toolbar h3 {
    margin: 0 0 4px;
    color: #17211f;
    font-size: 18px;
    font-weight: 800;
}

.category-toolbar p {
    margin: 0;
    color: #668078;
}

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

.category-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(23, 33, 31, 0.08);
    box-shadow: 0 12px 30px rgba(23, 33, 31, 0.07);
}

.category-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(58, 141, 114, 0.12);
    color: #3a8d72;
    font-size: 22px;
}

.expense-category-icon {
    background: rgba(211, 107, 84, 0.12);
    color: #d36b54;
}

.category-card-body {
    flex: 1;
}

.category-card-body h3 {
    margin: 0 0 8px;
    color: #17211f;
    font-size: 22px;
    line-height: 1.18;
    font-weight: 800;
}

.category-card-body p {
    margin: 0;
    color: #668078;
    line-height: 1.55;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fbfaf7;
    border: 1px solid rgba(23, 33, 31, 0.08);
    color: #2f735d;
    text-decoration: none;
}

.table-actions a:hover {
    background: #3a8d72;
    color: #ffffff;
}

.table-actions a.danger {
    color: #b94733;
}

.table-actions a.danger:hover {
    background: #d36b54;
    color: #ffffff;
}

.empty-action {
    width: auto;
    min-width: 150px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-page,
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(244, 178, 79, 0.18), transparent 30rem),
        linear-gradient(135deg, #faf8f3 0%, #eef5f1 100%);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: white;
    padding: 28px;
    border-radius: 8px;
    border: 1px solid rgba(23, 33, 31, 0.08);
    box-shadow: 0 18px 45px rgba(23, 33, 31, 0.1);
}

.auth-wrapper-wide {
    align-items: center;
}

.register-card {
    max-width: 960px;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
    overflow: hidden;
}

.login-card {
    max-width: 860px;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
    overflow: hidden;
}

.auth-intro {
    background: #17211f;
    color: #ffffff;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.login-intro {
    background:
        linear-gradient(145deg, rgba(23, 33, 31, 0.96), rgba(39, 73, 62, 0.96)),
        #17211f;
}

.auth-badge {
    width: fit-content;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(244, 178, 79, 0.16);
    color: #f4b24f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-intro h1 {
    margin: 18px 0 12px;
    font-size: 34px;
    line-height: 1.08;
    font-weight: 800;
}

.auth-intro p {
    margin: 0;
    color: #c9d8d2;
    font-size: 16px;
    line-height: 1.6;
}

.auth-highlights {
    display: grid;
    gap: 12px;
}

.auth-highlights div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.auth-highlights strong,
.auth-highlights span {
    display: block;
}

.auth-highlights strong {
    color: #ffffff;
    margin-bottom: 4px;
}

.auth-highlights span {
    color: #b7c7c0;
    font-size: 13px;
    line-height: 1.45;
}

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

.auth-metrics div {
    min-height: 94px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-metrics strong,
.auth-metrics span {
    display: block;
}

.auth-metrics strong {
    color: #f4b24f;
    font-size: 22px;
    font-weight: 800;
}

.auth-metrics span {
    color: #c9d8d2;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-form-panel {
    padding: 34px;
}

.auth-form-heading {
    margin-bottom: 22px;
}

.auth-form-heading h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
}

.auth-form-heading p {
    margin: 0;
    color: #668078;
}

.auth-form {
    display: grid;
    gap: 18px;
}

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

.form-field {
    display: grid;
    gap: 7px;
}

.form-field:not(.form-field-half) {
    grid-column: 1 / -1;
}

.auth-form .form-label {
    margin: 0;
    color: #2b3a36;
    font-size: 13px;
    font-weight: 800;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(23, 33, 31, 0.16);
    border-radius: 8px;
    background: #fbfaf7;
    color: #17211f;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    border-color: #3a8d72;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 141, 114, 0.12);
}

.form-help {
    color: #668078;
    font-size: 12px;
    line-height: 1.45;
}

.form-help ul,
.field-error ul {
    margin: 0;
    padding-left: 18px;
}

.field-error {
    color: #b42318;
    font-size: 12px;
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    background: #3a8d72;
    color: #ffffff;
    font-weight: 800;
}

.auth-submit:hover {
    background: #2f735d;
    color: #ffffff;
}

.auth-switch {
    margin: 18px 0 0;
    text-align: center;
    color: #668078;
}

.auth-switch a {
    color: #2f735d;
    font-weight: 800;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.table th {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        width: min(86vw, 340px);
        height: 100vh;
        min-height: 100vh;
        overflow-y: auto;
        box-shadow: 18px 0 45px rgba(23, 33, 31, 0.2);
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        z-index: 30;
    }

    body.mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.sidebar-collapsed .sidebar {
        width: min(86vw, 340px);
    }

    .sidebar-brand {
        padding: 18px;
    }

    .app-shell.sidebar-collapsed .sidebar-brand {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        padding-inline: 18px;
    }

    .app-shell.sidebar-collapsed .brand-copy {
        opacity: 1;
        visibility: visible;
        width: auto;
        flex: 1;
        overflow: visible;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar-menu {
        display: block;
        padding: 12px;
    }

    .sidebar-menu li {
        margin-bottom: 6px;
    }

    .sidebar-menu a,
    .logout-btn {
        min-height: 48px;
    }

    .app-shell.sidebar-collapsed .sidebar-menu {
        padding: 12px;
    }

    .app-shell.sidebar-collapsed .sidebar-menu a,
    .app-shell.sidebar-collapsed .logout-btn {
        justify-content: flex-start;
        gap: 12px;
        padding-inline: 12px;
    }

    .app-shell.sidebar-collapsed .sidebar-menu a span:not(.nav-icon),
    .app-shell.sidebar-collapsed .logout-btn span:not(.nav-icon) {
        opacity: 1;
        visibility: visible;
        width: auto;
        overflow: visible;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .app-shell.sidebar-collapsed .main-content {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        position: sticky;
        align-items: flex-start;
        padding: 20px;
    }

    .topbar > div:first-child {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 12px;
        align-items: center;
    }

    .topbar-kicker,
    .topbar h1 {
        grid-column: 2;
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        border: 1px solid rgba(23, 33, 31, 0.1);
        border-radius: 8px;
        background: #ffffff;
        color: #17211f;
        display: grid;
        grid-row: 1 / span 2;
        place-items: center;
        box-shadow: 0 12px 30px rgba(23, 33, 31, 0.08);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(23, 33, 31, 0.45);
        display: none;
        z-index: 20;
    }

    body.mobile-sidebar-open .sidebar-backdrop {
        display: block;
    }

    .quote-chip {
        max-width: none;
        width: 100%;
    }

    .topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }

    .content-area {
        padding: 20px;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 24px;
    }

    .dashboard-hero h2 {
        font-size: 34px;
    }

    .hero-balance-card {
        max-width: 360px;
    }

    .quick-actions,
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 24px;
    }

    .page-hero h2 {
        font-size: 34px;
    }

    .account-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .account-filter {
        grid-template-columns: 1fr;
    }

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

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

    .finance-form-grid {
        grid-template-columns: 1fr;
    }

    .finance-field-full {
        grid-column: auto;
    }

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

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

    .income-filter .filter-field-wide,
    .income-filter-actions {
        grid-column: 1 / -1;
    }

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

    .transaction-filter .filter-field-wide,
    .transaction-filter-actions {
        grid-column: 1 / -1;
    }

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

@media (max-width: 560px) {
    .topbar {
        flex-direction: column;
        gap: 14px;
    }

    .topbar-actions,
    .date-time-chip,
    .user-chip {
        width: 100%;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .content-area {
        padding: 14px;
    }

    .register-card {
        grid-template-columns: 1fr;
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    .auth-intro,
    .auth-form-panel {
        padding: 24px;
    }

    .auth-intro h1 {
        font-size: 28px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-half {
        grid-column: 1 / -1;
    }

    .auth-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        min-height: auto;
        padding: 22px;
    }

    .dashboard-hero h2 {
        font-size: 28px;
    }

    .hero-balance-card {
        max-width: none;
    }

    .quick-actions,
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .quick-actions a {
        justify-content: flex-start;
    }

    .stat-card {
        min-height: 108px;
    }

    .chart-wrap,
    .chart-wrap-small {
        height: 250px;
    }

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

    .finance-list-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .finance-list-item .amount {
        grid-column: 2;
    }

    .profile-identity {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .profile-identity h2 {
        font-size: 28px;
    }

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

    .profile-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-save-btn {
        width: 100%;
    }

    .page-hero {
        min-height: auto;
        padding: 18px;
    }

    .page-hero h2 {
        font-size: 28px;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

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

    .modern-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .form-action-row {
        align-items: stretch;
        flex-direction: column-reverse;
        width: 100%;
    }

    .form-action-row .btn {
        width: 100%;
    }

    .detail-actions,
    .detail-actions > div {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-actions .btn,
    .detail-actions a {
        width: 100%;
    }

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

    .detail-list div {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-list strong {
        text-align: left;
    }

    .delete-card {
        padding: 24px;
    }

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

    .income-filter {
        grid-template-columns: 1fr;
    }

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

    .income-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .transaction-filter {
        grid-template-columns: 1fr;
    }

    .transaction-filter .filter-field-wide,
    .transaction-filter-actions {
        grid-column: auto;
    }

    .transaction-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow: visible;
    }

    .table-responsive table {
        min-width: 0;
    }

    .mobile-card-table thead {
        display: none;
    }

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

    .mobile-card-table tr {
        padding: 14px;
        margin-bottom: 12px;
        border: 1px solid rgba(23, 33, 31, 0.08);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(23, 33, 31, 0.06);
    }

    .mobile-card-table td {
        min-height: 34px;
        padding: 8px 0;
        border-bottom: 1px solid rgba(23, 33, 31, 0.06);
    }

    .mobile-card-table td:last-child {
        border-bottom: 0;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #668078;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .mobile-card-table td:not([data-label])::before {
        content: none;
    }

    .table-actions {
        justify-content: flex-start;
    }

    .category-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .category-toolbar > div {
        align-items: flex-start;
    }

    .category-toolbar .btn {
        width: 100%;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}
