* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #eef4ff;
    color: #172554;
}

a {
    text-decoration: none !important;
}

.app {
    max-width: 600px;
    min-height: 100vh;
    margin: auto;
    background: #f5f8ff;
    position: relative;
    padding-bottom: 80px;
}


/* =========================
   Landing
========================= */

.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 35px 18px;
    background:
        radial-gradient(circle at top, #2563eb, transparent 45%),
        linear-gradient(145deg, #061d49, #0b4da2);
    color: white;
}

.brand-icon {
    width: 85px;
    height: 85px;
    margin: auto;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    font-size: 38px;
}

.landing h1 {
    margin-top: 22px;
    font-size: 34px;
    font-weight: 800;
}

.subtitle {
    opacity: .85;
}

.notice-card {
    margin: 25px 0;
    padding: 15px;
    border-radius: 15px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
}

.notice-card i {
    margin-right: 8px;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.feature-card {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.15);
}

.feature-card i {
    font-size: 28px;
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 18px;
}

.feature-card p {
    margin: 0;
    opacity: .8;
    font-size: 14px;
}

.landing-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 25px;
}

.btn-main,
.btn-outline {
    padding: 14px;
    border-radius: 13px;
    font-weight: 700;
}

.btn-main {
    background: white;
    color: #0750a5;
}

.btn-outline {
    color: white;
    border: 1px solid rgba(255,255,255,.5);
}


/* =========================
   Auth
========================= */

.auth-page {
    min-height: 100vh;
    padding: 25px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, #2563eb, transparent 45%),
        linear-gradient(145deg, #061d49, #0b4da2);
}

.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 30px 22px;
    border-radius: 25px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 25px 70px rgba(0,0,0,.25);
}

.auth-logo {
    width: 65px;
    height: 65px;
    margin: auto;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0754a8;
    color: white;
    font-size: 27px;
}

.auth-card h2 {
    text-align: center;
    margin-top: 15px;
    font-weight: 800;
}

.auth-subtitle {
    text-align: center;
    color: #64748b;
}

.input-box {
    height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 14px;
    border-radius: 13px;
    background: #edf4ff;
    border: 1px solid #dbeafe;
}

.input-box i {
    color: #0754a8;
}

.input-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
}

.btn-submit {
    width: 100%;
    border: 0;
    padding: 15px;
    border-radius: 13px;
    background: linear-gradient(135deg, #0754a8, #1478db);
    color: white;
    font-weight: 700;
}

.auth-bottom {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-bottom a {
    color: #0754a8;
    font-weight: 700;
}


/* =========================
   Topbar
========================= */

.topbar {
    height: 64px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0754a8;
    color: white;
}

.topbar strong {
    font-size: 18px;
}

.back-btn,
.logout-btn {
    color: white;
    font-size: 19px;
}


/* =========================
   Main
========================= */

.main-content {
    padding: 18px;
}

.welcome-card {
    padding: 20px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    box-shadow: 0 8px 30px rgba(15,23,42,.07);
}

.welcome-card span,
.welcome-card small {
    color: #64748b;
}

.welcome-card h2 {
    margin: 4px 0;
    font-size: 23px;
}

.user-icon {
    width: 55px;
    height: 55px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0edff;
    color: #0754a8;
    font-size: 23px;
}


/* =========================
   Balance
========================= */

.balance-card {
    margin-top: 15px;
    padding: 25px;
    border-radius: 22px;
    color: white;
    background: linear-gradient(135deg, #0754a8, #1680dd);
    box-shadow: 0 15px 35px rgba(7,84,168,.25);
}

.balance-card span {
    opacity: .8;
}

.balance-card h1 {
    margin: 8px 0;
    font-size: 34px;
    font-weight: 800;
}

.balance-card small {
    opacity: .75;
}


/* =========================
   Stats
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 7px 25px rgba(15,23,42,.06);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f0ff;
    color: #0754a8;
}

.stat-card span {
    display: block;
    font-size: 13px;
    color: #64748b;
}

.stat-card strong {
    font-size: 19px;
}


/* =========================
   Menu
========================= */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.menu-card {
    min-height: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: white;
    color: #172554;
    border-radius: 17px;
    box-shadow: 0 7px 25px rgba(15,23,42,.06);
}

.menu-card i {
    font-size: 24px;
    color: #0754a8;
}

.menu-card span {
    font-size: 13px;
    font-weight: 600;
}


/* =========================
   Bottom Navigation
========================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 68px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border-top: 1px solid #e2e8f0;
    z-index: 100;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #64748b;
    font-size: 11px;
}

.bottom-nav a i {
    font-size: 19px;
}

.bottom-nav a.active {
    color: #0754a8;
}


/* =========================
   Referral
========================= */

.referral-hero {
    padding: 25px;
    text-align: center;
    border-radius: 22px;
    background: linear-gradient(135deg, #0754a8, #1680dd);
    color: white;
}

.referral-icon {
    width: 60px;
    height: 60px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255,255,255,.15);
    font-size: 25px;
}

.referral-hero h2 {
    margin: 12px 0 5px;
}

.referral-hero p {
    margin: 0;
    opacity: .85;
}

.ref-link-card {
    margin-top: 15px;
    padding: 18px;
    border-radius: 18px;
    background: white;
}

.ref-link-card label {
    display: block;
    margin-bottom: 9px;
    font-weight: 700;
}

.copy-row {
    display: flex;
    gap: 8px;
}

.copy-row input {
    min-width: 0;
    flex: 1;
    padding: 12px;
    border: 1px solid #dbeafe;
    background: #f5f8ff;
    border-radius: 10px;
    font-size: 12px;
}

.copy-row button {
    width: 48px;
    border: 0;
    border-radius: 10px;
    background: #0754a8;
    color: white;
}

#copyMessage {
    color: #15803d;
    font-size: 13px;
    margin-top: 7px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 2px 12px;
}

.section-title h3 {
    font-size: 18px;
    margin: 0;
}

.section-title span {
    background: #dbeafe;
    color: #0754a8;
    padding: 4px 10px;
    border-radius: 20px;
}

.ref-user-card {
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 16px;
}

.ref-user-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #e7f0ff;
    color: #0754a8;
}

.ref-user-card strong,
.ref-user-card small {
    display: block;
}

.ref-user-card small {
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.verified {
    margin-left: auto;
    color: #16a34a;
}


/* =========================
   Profile
========================= */

.profile-card {
    padding: 25px;
    text-align: center;
    background: white;
    border-radius: 22px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e0edff;
    color: #0754a8;
    font-size: 30px;
}

.profile-card h2 {
    margin-top: 12px;
    margin-bottom: 3px;
}

.profile-card p {
    color: #64748b;
}

.status-badge {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 20px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
}

.form-card {
    margin-top: 15px;
    padding: 20px;
    background: white;
    border-radius: 20px;
}

.form-card h3 {
    margin-bottom: 18px;
}

.form-card label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.disabled-input {
    opacity: .65;
}


/* =========================
   History
========================= */

.page-heading h2 {
    font-size: 22px;
}

.page-heading p {
    color: #64748b;
}

.history-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 17px;
}

.history-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #e7f0ff;
    color: #0754a8;
}

.history-info {
    min-width: 0;
    flex: 1;
}

.history-info strong,
.history-info small {
    display: block;
}

.history-info strong {
    font-size: 14px;
}

.history-info small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

.history-amount {
    color: #16a34a;
    font-weight: 800;
    font-size: 14px;
}


/* =========================
   Common
========================= */

.success-box {
    padding: 13px 15px;
    margin-bottom: 15px;
    border-radius: 13px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
}

.empty-card {
    padding: 40px 20px;
    text-align: center;
    background: white;
    border-radius: 20px;
}

.empty-card i {
    font-size: 40px;
    color: #0754a8;
    margin-bottom: 12px;
}

.empty-card p {
    color: #64748b;
    margin: 0;
}


/* =========================
   Mobile
========================= */

@media (max-width: 380px) {

    .main-content {
        padding: 13px;
    }

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

    .landing-buttons {
        grid-template-columns: 1fr;
    }

    .balance-card h1 {
        font-size: 29px;
    }
}