:root {
    --ink: #173c4f;
    --muted: #71858a;
    --line: #e6eded;
    --teal: #356e74;
    --paper: #f4f8f7;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
}
button,
input,
select {
    font: inherit;
}
button {
    cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #dfac57;
    outline-offset: 3px;
}
.app-shell {
    max-width: 1440px;
    margin: auto;
}
.topbar {
    height: 88px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e1ebea;
    background: #fff;
}
.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -1px;
    line-height: 1;
}
.brand-light {
    color: #6e9997;
}
.brand small {
    display: block;
    letter-spacing: 0;
    font:
        500 10px "DM Sans",
        sans-serif;
    color: #8a9c9d;
    margin-top: 5px;
}
.brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    background: #1d5060;
    color: #fff;
    font-size: 28px;
    display: grid;
    place-items: center;
    position: relative;
}
.brand-mark span {
    color: #eac476;
}
.top-note {
    color: #8a9c9d;
    font-size: 12px;
}
main {
    max-width: 1280px;
    margin: auto;
    padding: 51px 7% 30px;
}
.heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 27px;
}
.hello,
.kicker {
    color: #6e9997;
    font-weight: 700;
    font-size: 12px;
    margin: 0 0 9px;
}
.heading h1 {
    font:
        700 35px/1.15 "Plus Jakarta Sans",
        sans-serif;
    letter-spacing: -1.6px;
    margin: 0 0 10px;
}
.heading p:not(.hello),
.section-heading p:not(.kicker) {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.date-pill {
    background: #e7f0ef;
    color: #5e8584;
    border-radius: 30px;
    padding: 10px 15px;
    font-size: 12px;
    white-space: nowrap;
}
.overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    background: #1c4a5d;
    border-radius: 20px;
    overflow: hidden;
    color: white;
    margin-bottom: 34px;
}
.overview-main {
    padding: 30px 34px 32px;
}
.overview-top {
    display: flex;
    justify-content: space-between;
    color: #c2d8d7;
    font-size: 13px;
}
.sparkle {
    color: #e5be77;
    font-size: 24px;
    line-height: 1;
}
.overview-main > strong {
    font:
        700 37px/1.3 "Plus Jakarta Sans",
        sans-serif;
    letter-spacing: -1px;
    display: block;
    margin-top: 8px;
}
.overview-main > p {
    color: #b2cece;
    margin: 5px 0 26px;
}
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.button {
    border: 0;
    border-radius: 9px;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 13px;
}
.light {
    background: #fff;
    color: #245467;
}
.light span {
    font-size: 19px;
    vertical-align: -1px;
    line-height: 0;
    margin-right: 3px;
}
.outline-light {
    background: transparent;
    border: 1px solid #779a9f;
    color: white;
}
.overview-side {
    border-left: 1px solid #527584;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px 32px;
    gap: 24px;
    background: #204f62;
}
.overview-side > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 10px;
}
.overview-side > div > span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    background: #376777;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #c6e1d9;
}
.overview-side p {
    margin: 0;
    color: #c6dcdc;
    font-size: 12px;
}
.overview-side p small {
    display: block;
    color: #8eb1b7;
    margin-top: 3px;
}
.overview-side strong {
    grid-column: 2;
    margin-top: 5px;
    font:
        700 17px "Plus Jakarta Sans",
        sans-serif;
}
.content-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 22px;
}
.section {
    background: #fff;
    border: 1px solid #e7eeee;
    border-radius: 18px;
    padding: 27px 28px;
}
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}
.section h2,
dialog h2 {
    font:
        700 20px "Plus Jakarta Sans",
        sans-serif;
    letter-spacing: -0.55px;
    margin: 0 0 7px;
}
.section-heading p:not(.kicker) {
    font-size: 12px;
}
.text-button {
    border: 0;
    background: none;
    padding: 4px 0;
    color: #377b7c;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.text-button span {
    font-size: 16px;
}
.category-list {
    margin-top: 17px;
}
.category {
    display: flex;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid #edf2f1;
}
.category:last-child {
    border: 0;
}
.category-icon {
    flex: none;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--color), white 88%);
    color: var(--color);
    display: grid;
    place-items: center;
    font-size: 21px;
}
.category-info {
    flex: 1;
    min-width: 0;
}
.category-title,
.category-sub {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.category-title h3 {
    font-size: 13px;
    margin: 0;
    font-weight: 700;
}
.category-title strong {
    font:
        700 13px "Plus Jakarta Sans",
        sans-serif;
    white-space: nowrap;
}
.category-sub {
    color: #98a7a7;
    font-size: 10px;
    margin-top: 7px;
}
.progress {
    background: #edf2f1;
    border-radius: 9px;
    height: 4px;
    margin-top: 10px;
    overflow: hidden;
}
.progress i {
    display: block;
    background: var(--color);
    height: 100%;
    border-radius: 9px;
}
.footnote {
    font-size: 11px;
    color: #92a2a2;
    background: #f6f9f8;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
}
.chart-wrap {
    display: grid;
    place-items: center;
    padding: 27px 0 20px;
}
.donut {
    background: var(--chart);
    border-radius: 50%;
    width: 185px;
    height: 185px;
    display: grid;
    place-items: center;
}
.donut > div {
    width: 133px;
    height: 133px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.donut small {
    font-size: 11px;
    color: #8a9c9d;
    margin-bottom: 7px;
}
.donut strong {
    font:
        700 16px "Plus Jakarta Sans",
        sans-serif;
}
.legend > div {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #eff3f2;
    font-size: 12px;
}
.legend span {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #6b8183;
}
.legend i,
.settings-list i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.legend strong {
    font-size: 12px;
}
.transactions {
    margin-top: 22px;
}
.transaction {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #edf2f1;
    padding: 15px 0;
}
.transaction:first-of-type {
    margin-top: 20px;
}
.transaction-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ebf5f1;
    color: #478b76;
    font-size: 18px;
}
.transaction-icon.expense {
    background: #fbf1e8;
    color: #bc8c4d;
}
.transaction div {
    flex: 1;
}
.transaction div strong,
.transaction small {
    display: block;
}
.transaction small {
    color: #91a1a1;
    margin-top: 5px;
}
.transaction b {
    font-size: 13px;
}
.transaction b.income {
    color: #478b76;
}
.empty {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 30px 0 5px;
}
.empty > span {
    font-size: 25px;
    color: #88b3a9;
}
.empty div {
    flex: 1;
}
.empty p {
    color: #92a2a2;
    margin: 5px 0;
    font-size: 12px;
}
footer {
    color: #9aabab;
    text-align: center;
    padding: 31px 0 0;
    font-size: 11px;
}
footer span {
    padding: 0 5px;
}
.notice {
    padding: 15px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
}
.success {
    background: #dff2e9;
    color: #23614e;
}
.error {
    background: #fbe9e4;
    color: #974a38;
}
.error ul {
    margin: 8px 0 0;
    padding-left: 18px;
}
dialog {
    width: min(480px, calc(100% - 28px));
    max-height: 90vh;
    border: 0;
    border-radius: 18px;
    padding: 28px;
    color: var(--ink);
    box-shadow: 0 20px 70px #112d3c40;
}
dialog::backdrop {
    background: #142e3db8;
}
.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
}
.close {
    border: 0;
    background: #eff5f4;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 23px;
    color: #507172;
}
.dialog-description {
    color: #819496;
    line-height: 1.6;
    margin: 12px 0 22px;
}
form > label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 16px;
}
form > label > span {
    float: right;
    color: #a1aeae;
    font-weight: 400;
}
input,
select {
    display: block;
    width: 100%;
    border: 1px solid #dbe7e5;
    border-radius: 9px;
    padding: 12px;
    margin-top: 7px;
    background: #fff;
    color: var(--ink);
}
.primary {
    background: #225869;
    color: #fff;
    width: 100%;
    margin-top: 6px;
    padding: 14px;
}
.settings-list label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f1;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 600;
}
.settings-list label > span:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
}
.percent-input {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8a9c9d;
}
.percent-input input {
    width: 70px;
    text-align: right;
    margin: 0;
    padding: 9px;
}
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
}
.invalid {
    color: #bc5542;
}
@media (max-width: 750px) {
    .topbar {
        height: 72px;
        padding: 0 20px;
    }
    .top-note {
        display: none;
    }
    main {
        padding: 31px 18px 28px;
    }
    .heading {
        margin-bottom: 20px;
    }
    .heading h1 {
        font-size: 29px;
    }
    .heading p:not(.hello) {
        font-size: 13px;
        max-width: 340px;
    }
    .date-pill {
        display: none;
    }
    .overview {
        grid-template-columns: 1fr;
        margin-bottom: 22px;
    }
    .overview-main {
        padding: 24px;
    }
    .overview-main > strong {
        font-size: 30px;
    }
    .overview-main > p {
        font-size: 12px;
        margin-bottom: 20px;
    }
    .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .button {
        padding: 13px 8px;
        font-size: 12px;
    }
    .overview-side {
        border-left: 0;
        border-top: 1px solid #527584;
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 18px 23px;
        gap: 10px;
    }
    .overview-side > div {
        grid-template-columns: 29px 1fr;
        gap: 7px;
    }
    .overview-side > div > span {
        width: 29px;
        height: 29px;
    }
    .overview-side strong {
        font-size: 13px;
    }
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .section {
        padding: 23px 20px;
    }
    .section h2,
    dialog h2 {
        font-size: 18px;
    }
    .transactions {
        margin-top: 16px;
    }
    .chart-wrap {
        padding: 22px 0;
    }
    .donut {
        width: 165px;
        height: 165px;
    }
    .donut > div {
        width: 118px;
        height: 118px;
    }
    .empty {
        flex-wrap: wrap;
    }
    .empty .text-button {
        margin-left: 40px;
    }
    .category-sub {
        font-size: 10px;
    }
}
@media (max-width: 360px) {
    .category-title strong {
        font-size: 11px;
    }
    .category-sub {
        font-size: 9px;
    }
    .text-button {
        font-size: 11px;
    }
    .overview-main > strong {
        font-size: 26px;
    }
}
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}
.auth-box {
    width: min(100%, 430px);
    background: #fff;
    border: 1px solid #e7eeee;
    border-radius: 20px;
    padding: 32px;
}
.auth-box .brand {
    margin-bottom: 42px;
}
.auth-box h1 {
    font:
        700 26px "Plus Jakarta Sans",
        "DM Sans",
        sans-serif;
    letter-spacing: -1px;
    margin: 0;
}
.auth-copy {
    line-height: 1.6;
    color: #71858a;
    margin: 12px 0 25px;
}
.account-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.account-nav form {
    margin: 0;
}
.account-name {
    color: #71858a;
    font-size: 12px;
}
.module-link {
    color: inherit;
    text-decoration: none;
}
.module-link:hover h3 {
    text-decoration: underline;
}
.module-detail {
    margin-top: 8px;
    color: #6e9997;
    font-size: 11px;
    font-weight: 700;
}
@media (max-width: 750px) {
    .account-nav {
        gap: 10px;
    }
    .account-name {
        display: none;
    }
    .auth-box {
        padding: 26px;
    }
    .topbar .brand {
        font-size: 17px;
    }
    .account-nav .text-button {
        font-size: 11px;
    }
}
.pagination {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    font-size: 12px;
    color: #71858a;
}
.pagination a {
    color: #377b7c;
    font-weight: 700;
}
.password-field {
    position: relative;
    margin: -9px 0 16px;
}
.password-field input {
    padding-right: 48px;
}
.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #71858a;
    background: transparent;
}
.password-toggle[hidden] {
    display: none;
}
.password-toggle svg {
    width: 20px;
    height: 20px;
}
.password-toggle .eye-slash {
    display: none;
}
.password-toggle[aria-pressed="true"] .eye-slash {
    display: block;
}
.async-feedback {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    max-width: min(420px, calc(100% - 36px));
    padding: 14px 18px;
    border-radius: 12px;
    background: #245f52;
    color: #fff;
    box-shadow: 0 12px 32px #102f283d;
    line-height: 1.45;
    font-weight: 600;
    font-size: 13px;
}
.async-feedback-error {
    background: #914c3d;
}
.async-feedback[hidden] {
    display: none;
}
form[data-async][aria-busy="true"] button[type="submit"],
form[data-async][aria-busy="true"] button:not([type]) {
    opacity: 0.6;
    cursor: wait;
}

/* Shared interaction states for the dashboard, forms, and account pages. */
.button,
.text-button,
.close,
.password-toggle,
.pagination a {
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.button {
    min-height: 44px;
}
.primary {
    background: #215f59;
}
.primary:hover {
    background: #174b47;
}
.button.light:hover {
    background: #e7f5ef;
    color: #173f3b;
}
.text-button:hover {
    color: #174c48;
}
.close:hover,
.password-toggle:hover {
    background: #dcece6;
    color: #245f55;
}
.account-nav .text-button {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
}
.account-nav .text-button:hover {
    background: #e7f3ee;
}
input:not([type="hidden"]),
select {
    min-height: 43px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:not([type="hidden"]):hover,
select:hover {
    border-color: #a9cec1;
}
input:not([type="hidden"]):focus-visible,
select:focus-visible {
    border-color: #3a8a78;
    outline: 2px solid #b6dfd0;
    outline-offset: 1px;
}
.notice {
    line-height: 1.55;
}
.transaction {
    min-width: 0;
}
.transaction div {
    min-width: 0;
    overflow-wrap: anywhere;
}
.transaction b {
    flex: none;
}
.pagination {
    align-items: center;
    flex-wrap: wrap;
}
.pagination a {
    padding: 8px 10px;
    border: 1px solid #dcebe5;
    border-radius: 9px;
    text-decoration: none;
}
.pagination a:hover {
    background: #edf7f2;
}
dialog {
    max-width: calc(100% - 28px);
}
dialog::backdrop {
    background: rgba(15, 42, 45, 0.68);
}
@media (prefers-reduced-motion: reduce) {
    .button,
    .text-button,
    .close,
    .password-toggle,
    .pagination a,
    input:not([type="hidden"]),
    select {
        transition: none;
    }
}
