:root {
    --navy: #031542;
    --navy-deep: #020b2f;
    --violet: #6a35c8;
    --blue: #4c8df7;
    --cyan: #57d8ff;
    --white: #ffffff;
    --text: #07173f;
    --muted: #7180a5;
    --line: #c8d0e4;
    --danger: #d92958;
    --success: #087f5b;
    --shadow: 0 28px 70px rgba(2, 11, 47, 0.28);
    --radius: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--text);
    background:
        radial-gradient(circle at 82% 32%, rgba(87, 216, 255, 0.48), transparent 27%),
        radial-gradient(circle at 63% 9%, rgba(143, 74, 224, 0.74), transparent 36%),
        linear-gradient(125deg, var(--navy-deep) 0%, #07194d 31%, var(--violet) 64%, var(--blue) 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.auth-page {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 54px;
    padding: 48px 20px 28px;
}

.brand-block,
.brand-inline {
    display: flex;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    font-weight: 800;
}

.brand-block {
    justify-content: center;
    width: min(100%, 520px);
}

.brand-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 34px rgba(2, 11, 47, 0.22));
}

.brand-logo-large {
    max-width: clamp(260px, 42vw, 500px);
}

.brand-logo-nav {
    width: clamp(150px, 18vw, 220px);
    max-height: 62px;
}

.brand-mark {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border: 8px solid var(--white);
    border-radius: 50%;
    color: var(--white);
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    position: relative;
}

.brand-mark::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 34px;
    left: 24px;
    bottom: -13px;
    background: var(--white);
    border-radius: 14px;
}

.brand-mark.small {
    width: 36px;
    height: 36px;
    border-width: 4px;
    font-size: 1rem;
}

.brand-mark.small::after {
    width: 10px;
    height: 17px;
    left: 12px;
    bottom: -7px;
}

.login-card,
.hero-card {
    width: min(100%, 450px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.login-card {
    min-height: 350px;
    padding: 43px 44px 48px;
}

.login-card h1,
.hero-card h1,
.hero-card h2 {
    margin: 0;
    color: #04133b;
    letter-spacing: -0.05em;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 42px;
    font-size: 1.9rem;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.form-stack label {
    margin-top: 12px;
    color: #7a86aa;
    font-size: 0.78rem;
    font-weight: 700;
}

.form-stack input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    outline: none;
    padding: 12px 2px 13px;
    color: var(--text);
    background: transparent;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-stack input:focus {
    border-color: var(--violet);
    box-shadow: 0 8px 0 -7px rgba(106, 53, 200, 0.4);
}

.primary-button {
    width: 100%;
    margin-top: 26px;
    border: 0;
    border-radius: 6px;
    padding: 15px 18px;
    cursor: pointer;
    color: var(--white);
    background: linear-gradient(135deg, var(--violet), var(--blue));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 30px rgba(76, 141, 247, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 18px 36px rgba(76, 141, 247, 0.42);
}

.auth-footer {
    margin-top: auto;
    text-align: center;
    color: var(--white);
    font-size: 0.76rem;
    font-weight: 700;
}

.auth-footer a {
    color: #ff2a69;
    text-decoration: none;
}

.auth-footer p {
    margin: 5px 0 0;
}

.alert {
    border-radius: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 700;
}

.alert.error {
    color: var(--danger);
    background: rgba(217, 41, 88, 0.1);
}

.alert.success {
    color: var(--success);
    background: rgba(8, 127, 91, 0.11);
}

.app-page {
    min-height: 100vh;
    padding: 34px 20px;
}

.dashboard-shell {
    width: min(100%, 980px);
    margin: 0 auto;
}

.dashboard-shell.wide {
    width: min(100%, 1180px);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 34px;
}

.brand-inline {
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.logout-link {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.hero-card {
    width: 100%;
    padding: 34px;
}

.balance-card {
    max-width: 620px;
    margin: 80px auto 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--violet);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.balance-box {
    margin-top: 30px;
    border-radius: 18px;
    padding: 26px;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy), var(--violet) 55%, var(--blue));
    box-shadow: 0 18px 40px rgba(3, 21, 66, 0.24);
}

.balance-box span {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
}

.balance-box strong {
    display: block;
    font-size: clamp(2rem, 8vw, 4rem);
    letter-spacing: -0.07em;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}

.admin-form {
    margin-top: 10px;
}

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

.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

th,
td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(113, 128, 165, 0.18);
    text-align: left;
}

th {
    color: #7a86aa;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    color: var(--text);
    font-weight: 650;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

@media (max-width: 820px) {
    .auth-shell {
        gap: 34px;
        justify-content: flex-start;
    }

    .login-card {
        padding: 34px 28px 38px;
    }

    .admin-grid,
    .two-columns {
        grid-template-columns: 1fr;
    }

    .balance-card {
        margin-top: 28px;
    }
}

@media (max-width: 520px) {
    .brand-logo-large {
        max-width: min(78vw, 340px);
    }

    .brand-logo-nav {
        width: min(58vw, 180px);
        max-height: 50px;
    }

    .login-card,
    .hero-card {
        border-radius: 12px;
    }

    .topbar {
        gap: 14px;
        align-items: flex-start;
        flex-direction: column;
    }
}

.transactions-card {
    max-width: 860px;
    margin: 26px auto 0;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.transaction-table-wrap {
    margin-top: 22px;
    border: 1px solid rgba(113, 128, 165, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.transaction-table {
    min-width: 680px;
}

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

.transaction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.transaction-badge.in {
    color: var(--success);
    background: rgba(8, 127, 91, 0.12);
}

.transaction-badge.out {
    color: var(--danger);
    background: rgba(217, 41, 88, 0.12);
}

.amount {
    white-space: nowrap;
    font-weight: 900;
}

.amount.in {
    color: var(--success);
}

.amount.out {
    color: var(--danger);
}
