:root {
    --bg: #080a0f;
    --surface: #10131a;
    --surface-2: #151923;
    --border: rgba(255,255,255,.08);
    --text: #f5f7fa;
    --muted: #8d95a5;
    --primary: #20c997;
    --primary-dark: #12a879;
    --danger: #ff5c6c;
    --radius: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 24px 18px;
}

/* AUTH */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(20px, env(safe-area-inset-top))
        16px
        max(20px, env(safe-area-inset-bottom));
}

.auth-container {
    width: 100%;
    max-width: 430px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.auth-logo span {
    color: var(--primary);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.auth-card h2 {
    font-size: 22px;
    margin-bottom: 7px;
}

.auth-card > p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #cbd0da;
    font-size: 13px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

.form-group input::placeholder {
    color: #656d7c;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(32,201,151,.12);
}

.btn-primary {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #06110d;
    font-weight: 800;
    transition: background .2s, transform .15s;
}

.btn-primary:active {
    transform: scale(.98);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.auth-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255,92,108,.2);
    border-radius: 12px;
    background: rgba(255,92,108,.08);
    color: #ff8995;
    font-size: 13px;
    line-height: 1.4;
}

.auth-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
}

/* DASHBOARD */

.dashboard {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 16px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard-header h1 {
    font-size: 22px;
    letter-spacing: -.4px;
}

.dashboard-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.balance-card {
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, #121a1a, #10131a);
    border: 1px solid var(--border);
}

.balance-card small {
    color: var(--muted);
}

.balance-card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    letter-spacing: -1px;
}

.card {
    padding: 18px;
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

@media (min-width: 700px) {
    main {
        max-width: 520px;
    }

    .auth-card {
        padding: 32px;
    }

    .dashboard {
        padding: 32px 24px;
    }
}

@media (min-width: 1024px) {
    .dashboard {
        padding: 40px 32px;
    }

    .dashboard-header h1 {
        font-size: 28px;
    }
}

/* APP HEADER */

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8,10,15,.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.app-header-inner {
    width: 100%;
    max-width: 1180px;
    min-height: 64px;
    margin: auto;
    padding: 0 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.app-brand {
    font-size: 17px;
    font-weight: 850;
    white-space: nowrap;
}

.app-brand span {
    color: var(--primary);
}

.desktop-nav {
    display: none;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-deposit {
    display: none;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);
    color: #06110d;
    font-weight: 850;
}


/* WELCOME */

.welcome {
    margin: 8px 0 18px;
}

.welcome span {
    color: var(--muted);
    font-size: 13px;
}

.welcome h1 {
    margin-top: 3px;
    font-size: 24px;
    letter-spacing: -.6px;
}


/* BALANCE */

.balance-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-value {
    margin-top: 7px;
    font-size: 31px;
    font-weight: 850;
    letter-spacing: -1px;
}

.balance-value small {
    margin-right: 3px;
    color: var(--muted);
    font-size: 14px;
}

.balance-footer {
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}


/* BANNER */

.banner-card {
    position: relative;
    overflow: hidden;

    min-height: 245px;
    margin-top: 16px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(32,201,151,.22),
            transparent 38%
        ),
        linear-gradient(135deg, #121a1a, #10131a);
}

.banner-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.banner-overlay {
    position: relative;
    min-height: 245px;

    display: flex;
    align-items: center;

    padding: 24px;

    background: linear-gradient(
        90deg,
        rgba(8,10,15,.96) 0%,
        rgba(8,10,15,.72) 48%,
        rgba(8,10,15,.1) 100%
    );
}

.banner-content {
    max-width: 500px;
}

.banner-tag {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.banner-content h2 {
    margin-top: 8px;
    font-size: 25px;
    line-height: 1.1;
    letter-spacing: -.7px;
}

.banner-content p {
    max-width: 420px;
    margin-top: 9px;
    color: #aeb5c1;
    font-size: 13px;
    line-height: 1.5;
}

.banner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    margin-top: 18px;
    padding: 0 17px;

    border-radius: 10px;
    background: var(--primary);

    color: #06110d;
    font-size: 13px;
    font-weight: 800;
}


/* DASHBOARD CARDS */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.dashboard-card {
    min-width: 0;
    padding: 17px;

    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.dashboard-card span {
    color: var(--muted);
    font-size: 12px;
}

.dashboard-card strong {
    display: block;
    margin-top: 8px;

    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-card small {
    display: block;
    margin-top: 6px;
    color: #687181;
    font-size: 11px;
}


/* ACTIONS */

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    padding-bottom: 85px;
}

.action-card {
    min-height: 92px;
    padding: 15px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);

    transition: border-color .2s, transform .15s;
}

.action-card:active {
    transform: scale(.98);
}

.action-card strong {
    font-size: 14px;
}

.action-card span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}


/* MOBILE NAV */

.mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;

    height: calc(64px + env(safe-area-inset-bottom));

    padding:
        7px
        8px
        env(safe-area-inset-bottom);

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    background: rgba(10,12,18,.97);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;

    color: #737b8a;
    font-size: 9px;
    font-weight: 650;
}

.mobile-nav a span {
    font-size: 19px;
    line-height: 20px;
}

.mobile-nav a.active {
    color: var(--primary);
}


/* DESKTOP */

@media (min-width: 800px) {

    .app-header-inner {
        min-height: 70px;
        padding: 0 24px;
    }

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .desktop-nav a {
        padding: 9px 13px;
        border-radius: 8px;

        color: #9ca4b4;
        font-size: 13px;
    }

    .desktop-nav a:hover,
    .desktop-nav a.active {
        background: var(--surface-2);
        color: var(--text);
    }

    .header-deposit {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-height: 40px;
        padding: 0 15px;

        border-radius: 9px;
        background: var(--primary);

        color: #06110d;
        font-size: 12px;
        font-weight: 800;
    }

    .dashboard {
        padding-top: 30px;
    }

    .banner-card,
    .balance-card {
        min-height: 270px;
    }

    .banner-overlay {
        min-height: 270px;
        padding: 34px;
    }

    .banner-content h2 {
        font-size: 34px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        padding-bottom: 30px;
    }

    .mobile-nav {
        display: none;
    }
}