:root {
    --bg: #f2f5fb;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-solid: #ffffff;

    --ink: #111b32;
    --muted: #68738a;
    --line: rgba(20, 48, 98, 0.10);

    --accent: #1648a8;
    --accent-light: #2f6ee5;
    --accent-dark: #0b285f;

    --navy: #071a3c;
    --navy-light: #102c61;

    --soft: #edf3ff;

    --good: #07875f;
    --good-soft: #e8f8f2;

    --bad: #d04152;
    --bad-soft: #fff0f2;

    --shadow:
        0 18px 45px rgba(24, 47, 89, 0.08),
        0 3px 10px rgba(24, 47, 89, 0.04);

    --shadow-hover:
        0 24px 60px rgba(24, 47, 89, 0.14),
        0 5px 15px rgba(24, 47, 89, 0.07);

    --radius: 20px;
}

/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--ink);

    background:
        radial-gradient(
            circle at 8% 8%,
            rgba(47, 110, 229, 0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 22%,
            rgba(33, 169, 159, 0.09),
            transparent 25%
        ),
        radial-gradient(
            circle at 60% 100%,
            rgba(77, 105, 193, 0.08),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #f8faff 0%,
            #f1f5fb 45%,
            #edf2f9 100%
        );

    background-attachment: fixed;
}

/* subtle banking-style background decoration */

body::before {
    content: "";
    position: fixed;
    width: 460px;
    height: 460px;
    right: -160px;
    top: 140px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            rgba(33, 91, 202, 0.09),
            rgba(45, 173, 164, 0.035)
        );

    filter: blur(3px);

    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;

    width: 360px;
    height: 360px;

    left: -170px;
    bottom: -80px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            rgba(9, 43, 98, 0.08),
            rgba(47, 110, 229, 0.03)
        );

    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition:
        color 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

a:hover {
    color: var(--accent-dark);
}


/* --------------------------------------------------
   TOP NAVIGATION
-------------------------------------------------- */

.topbar {
    min-height: 78px;

    background: rgba(255, 255, 255, 0.82);

    border-bottom: 1px solid rgba(18, 46, 94, 0.08);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 5vw;

    position: sticky;
    top: 0;

    z-index: 100;

    box-shadow:
        0 5px 24px rgba(24, 47, 89, 0.035);
}

.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    color: var(--ink);

    font-weight: 800;
    font-size: 17px;

    letter-spacing: -0.3px;
}

.brand:hover {
    color: var(--ink);
}

.brand-mark {
    width: 42px;
    height: 42px;

    border-radius: 13px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            145deg,
            #0d347e 0%,
            #1d5ac5 60%,
            #337be9 100%
        );

    color: white;

    font-size: 14px;
    font-weight: 800;

    letter-spacing: 0.5px;

    box-shadow:
        0 8px 20px rgba(29, 90, 197, 0.28);
}

nav {
    display: flex;
    align-items: center;

    gap: 24px;
}

nav > a:not(.primary) {
    color: #36435a;

    font-size: 14px;
    font-weight: 650;

    position: relative;
}

nav > a:not(.primary):hover {
    color: var(--accent);
}

.inline-form {
    display: inline;
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;

    color: var(--muted);

    font: inherit;
    font-size: 14px;

    cursor: pointer;

    padding: 8px 0;
}

.link-button:hover {
    color: var(--bad);
}


/* --------------------------------------------------
   PAGE CONTAINER
-------------------------------------------------- */

.container {
    width: min(1200px, 92vw);

    margin: 42px auto 80px;

    position: relative;
}


/* --------------------------------------------------
   HERO
-------------------------------------------------- */

.hero {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 28px;

    margin-bottom: 30px;

    position: relative;
}

.hero.compact {
    align-items: center;
}

.hero > div:first-child {
    max-width: 720px;
}

h1 {
    margin: 7px 0 8px;

    font-size: clamp(32px, 4vw, 49px);

    letter-spacing: -1.7px;
    line-height: 1.05;

    font-weight: 800;

    color: #121c31;
}

h2 {
    margin: 0 0 5px;

    font-size: 23px;

    letter-spacing: -0.5px;
}

.eyebrow {
    display: inline-flex;

    align-items: center;

    font-size: 11px;

    letter-spacing: 2px;

    font-weight: 800;

    color: var(--accent);

    text-transform: uppercase;

    background: rgba(34, 93, 203, 0.08);

    padding: 7px 11px;

    border-radius: 30px;
}

.muted {
    color: var(--muted);

    margin-top: 7px;

    line-height: 1.6;
}


/* --------------------------------------------------
   DASHBOARD CARDS
-------------------------------------------------- */

.cards {
    display: grid;

    grid-template-columns: 1.35fr 1fr 1fr;

    gap: 18px;

    margin-bottom: 22px;
}

.card,
.panel,
.auth-card {
    background: var(--surface);

    border: 1px solid rgba(25, 55, 105, 0.08);

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card {
    padding: 27px;

    min-height: 143px;

    position: relative;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-hover);

    border-color: rgba(38, 91, 190, 0.16);
}

.card span {
    display: block;

    color: var(--muted);

    margin-bottom: 12px;

    font-size: 14px;

    font-weight: 600;
}

.card strong {
    display: block;

    font-size: 31px;

    line-height: 1.1;

    letter-spacing: -0.8px;

    font-variant-numeric: tabular-nums;
}


/* main balance card */

.balance-card {
    color: white;

    background:
        radial-gradient(
            circle at 90% 5%,
            rgba(255, 255, 255, 0.16),
            transparent 33%
        ),
        radial-gradient(
            circle at 70% 110%,
            rgba(65, 153, 255, 0.32),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #071e4a 0%,
            #103c8f 48%,
            #1d60ce 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.10);

    box-shadow:
        0 20px 45px rgba(13, 52, 126, 0.23);
}

.balance-card::before {
    content: "";

    position: absolute;

    width: 170px;
    height: 170px;

    border: 1px solid rgba(255, 255, 255, 0.10);

    border-radius: 50%;

    right: -45px;
    top: -70px;
}

.balance-card::after {
    content: "";

    position: absolute;

    width: 115px;
    height: 115px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 50%;

    right: 30px;
    bottom: -75px;
}

.balance-card span {
    color: rgba(255, 255, 255, 0.76);
}

.balance-card strong {
    font-size: 37px;

    color: #ffffff;

    position: relative;

    z-index: 2;
}


/* --------------------------------------------------
   PANEL
-------------------------------------------------- */

.panel {
    overflow: hidden;

    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.panel-head {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 24px 26px;

    border-bottom: 1px solid var(--line);

    background:
        linear-gradient(
            180deg,
            rgba(251, 253, 255, 0.9),
            rgba(255, 255, 255, 0.65)
        );
}

.panel-head a {
    font-weight: 700;

    font-size: 14px;
}


/* --------------------------------------------------
   TABLES
-------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 830px;

    font-size: 14px;
}

th,
td {
    padding: 17px 18px;

    border-bottom: 1px solid rgba(22, 52, 100, 0.075);

    text-align: left;

    vertical-align: middle;
}

th {
    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1px;

    color: #748097;

    background:
        linear-gradient(
            180deg,
            #fafcff,
            #f7f9fd
        );

    font-weight: 800;
}

tbody tr {
    transition:
        background-color 0.18s ease,
        transform 0.18s ease;
}

tbody tr:hover {
    background: #f8faff;
}

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

.money {
    text-align: right;

    white-space: nowrap;

    font-variant-numeric: tabular-nums;

    font-weight: 650;
}

.credit {
    color: var(--good);
}

.debit {
    color: var(--bad);
}

.empty {
    text-align: center;

    color: var(--muted);

    padding: 46px;

    font-size: 14px;
}


/* --------------------------------------------------
   BUTTONS
-------------------------------------------------- */

.primary,
.secondary,
.danger {
    display: inline-flex;

    justify-content: center;
    align-items: center;

    min-height: 46px;

    border-radius: 13px;

    padding: 0 19px;

    border: 0;

    cursor: pointer;

    font-weight: 750;

    font-size: 14px;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.primary {
    color: white;

    background:
        linear-gradient(
            135deg,
            #123b88,
            #1d5bc6
        );

    box-shadow:
        0 8px 20px rgba(29, 91, 198, 0.23);
}

.primary:hover {
    color: white;

    background:
        linear-gradient(
            135deg,
            #0e3175,
            #174da9
        );

    transform: translateY(-1px);

    box-shadow:
        0 12px 25px rgba(29, 91, 198, 0.30);
}

.primary:active {
    transform: translateY(0);
}

.primary.small {
    min-height: 39px;

    padding: 0 15px;

    border-radius: 11px;
}

.secondary {
    background: #eef2f8;

    color: var(--ink);

    border: 1px solid rgba(22, 52, 100, 0.06);
}

.secondary:hover {
    background: #e6ebf4;

    transform: translateY(-1px);
}

.secondary.ghost {
    background: rgba(255, 255, 255, 0.60);

    border: 1px solid var(--line);
}

.danger {
    background:
        linear-gradient(
            135deg,
            #c63748,
            #df5362
        );

    color: white;

    box-shadow:
        0 7px 18px rgba(208, 65, 82, 0.20);
}


/* --------------------------------------------------
   FILTER AREA
-------------------------------------------------- */

.filters {
    display: grid;

    grid-template-columns:
        minmax(260px, 1fr)
        160px
        180px
        auto
        auto;

    gap: 11px;

    margin-bottom: 18px;

    padding: 15px;

    background: rgba(255, 255, 255, 0.62);

    border: 1px solid rgba(25, 55, 105, 0.07);

    border-radius: 17px;

    box-shadow:
        0 8px 25px rgba(22, 49, 94, 0.04);

    backdrop-filter: blur(10px);
}


/* --------------------------------------------------
   FORMS
-------------------------------------------------- */

input,
select,
textarea {
    width: 100%;

    border: 1px solid #dce2ed;

    background: rgba(255, 255, 255, 0.95);

    border-radius: 12px;

    min-height: 47px;

    padding: 11px 13px;

    font: inherit;

    color: var(--ink);

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c7d1e1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-light);

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(47, 110, 229, 0.10);
}

textarea {
    min-height: 102px;

    resize: vertical;
}

.form-shell {
    max-width: 850px;

    margin: 28px auto;
}

.form-panel {
    padding: 34px;
}

.form-panel h1 {
    font-size: 38px;

    margin-top: 12px;
}

.form-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-top: 28px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;

    font-size: 13px;

    font-weight: 750;

    margin-bottom: 8px;

    color: #364057;
}

.form-actions {
    display: flex;

    gap: 11px;

    margin-top: 10px;
}

.field-error {
    color: var(--bad);

    margin-top: 7px;

    font-size: 13px;
}


/* --------------------------------------------------
   LOGIN
-------------------------------------------------- */

.auth-shell {
    min-height: calc(100vh - 160px);

    display: grid;

    place-items: center;

    padding: 40px 0;
}

.auth-card {
    width: min(445px, 92vw);

    padding: 40px;

    position: relative;

    overflow: hidden;
}

.auth-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(49, 110, 228, 0.14),
            transparent 70%
        );

    right: -60px;
    top: -60px;
}

.auth-card h1 {
    font-size: 38px;

    position: relative;

    z-index: 2;
}

.stack {
    display: grid;

    gap: 12px;

    margin-top: 26px;
}

.stack .primary {
    margin-top: 7px;

    width: 100%;
}

.fineprint {
    color: var(--muted);

    font-size: 12px;

    margin-top: 20px;

    text-align: center;
}


/* --------------------------------------------------
   MESSAGES
-------------------------------------------------- */

.error-box,
.message {
    border-radius: 13px;

    padding: 13px 15px;

    margin: 14px 0;
}

.error-box {
    background: var(--bad-soft);

    color: var(--bad);

    border: 1px solid rgba(208, 65, 82, 0.14);
}

.message {
    background: var(--good-soft);

    color: #086849;

    border: 1px solid rgba(7, 135, 95, 0.13);
}


/* --------------------------------------------------
   TRANSACTION STATES
-------------------------------------------------- */

.badge {
    display: inline-block;

    margin-left: 8px;

    font-size: 9px;

    border-radius: 999px;

    padding: 4px 8px;

    background: var(--bad-soft);

    color: var(--bad);

    font-weight: 850;

    letter-spacing: 0.5px;
}

.void-row {
    opacity: 0.52;

    background: #fafafa;
}

.actions {
    white-space: nowrap;
}

.actions a {
    margin-right: 11px;

    font-weight: 650;

    font-size: 13px;
}

.danger-link {
    color: var(--bad);
}


/* --------------------------------------------------
   SCROLLBAR
-------------------------------------------------- */

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c7cfdd;

    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aeb9cb;
}


/* --------------------------------------------------
   MOBILE / TABLET
-------------------------------------------------- */

@media (max-width: 900px) {

    .topbar {
        align-items: flex-start;

        padding-top: 16px;
        padding-bottom: 16px;

        gap: 16px;
    }

    nav {
        flex-wrap: wrap;

        justify-content: flex-end;

        gap: 10px 15px;
    }

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

    .card {
        min-height: auto;
    }

    .hero {
        align-items: flex-start;

        flex-direction: column;
    }

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

    .filters input {
        grid-column: 1 / -1;
    }

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

    .form-grid .full {
        grid-column: auto;
    }
}


@media (max-width: 600px) {

    .topbar {
        position: static;

        flex-direction: column;

        padding-left: 5vw;
        padding-right: 5vw;
    }

    nav {
        justify-content: flex-start;

        width: 100%;
    }

    .container {
        width: 91vw;

        margin-top: 26px;
    }

    h1 {
        font-size: 34px;
    }

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

    .filters input {
        grid-column: auto;
    }

    .form-panel {
        padding: 24px;
    }

    .auth-card {
        padding: 30px 25px;
    }

    .balance-card strong {
        font-size: 33px;
    }

    .card strong {
        font-size: 28px;
    }
}