:root {
    /* Professional Corporate Palette */
    --primary: #1E3A8A; /* Deep Navy */
    --primary-dark: #152C69;
    --primary-light: #EFF6FF;
    --dark: #111827; /* Stark readable black */
    --secondary: #4B5563; /* Slate gray */
    --bg-light: #F3F4F6; /* Neutral clean background */
    --border: #E5E7EB;
    --white: #ffffff;
    --success: #059669; /* Trustworthy Emerald */
    --danger: #DC2626;
    
    /* Crisper Shadows & Sharper Radiuses */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --radius: 0.5rem; /* Sharper */
    --radius-md: 0.375rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--dark);
    line-height: 1.5;
    padding-bottom: 100px;
    -webkit-font-smoothing: antialiased;
}

.site-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-subtle);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-box {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Wallet Card */
.hero-card {
    background: var(--primary); /* Solid authoritative color */
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-balance {
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0.5rem 0;
    letter-spacing: -0.025em;
}

.btn-modern {
    display: inline-block;
    background: var(--white);
    color: var(--dark);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-align: center;
    border: 1px solid var(--border);
}

.btn-modern.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}

.btn-modern:active { transform: translateY(1px); }

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover .service-icon {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-subtle);
    transition: all 0.2s;
    color: var(--primary);
}

.service-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--dark);
}

/* Status Labels */
.coming-soon {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.8;
}

/* Sections */
.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--dark);
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; font-weight: 700; color: var(--primary); }
.text-muted { color: var(--secondary); font-size: 0.9rem; }

/* Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    z-index: 1000;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}

.nav-item-mob {
    text-decoration: none;
    color: var(--secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    gap: 4px;
}

.nav-item-mob.active { color: var(--primary); }
.nav-icon { font-size: 1.4rem; }

@media (min-width: 768px) {
    .site-container { max-width: 800px; }
    .services-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Form Controls Global Fixes */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--dark); font-size: 0.9rem; }
.form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-light); font-size: 0.95rem; outline: none; transition: all 0.2s; }
.form-control:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px var(--primary-light); }


/* =========================================
   MOBILE RESPONSIVE FIXES (Phones & Tablets)
========================================= */
@media (max-width: 768px) {
    /* 1. Hide the top text navigation (relies on bottom nav instead) */
    .nav-links {
        display: none !important;
    }

    /* 2. Keep the Logo and Logout aligned nicely */
    .nav-wrapper {
        justify-content: space-between !important;
    }
    
    .site-container {
        padding: 1rem;
    }

    /* 3. Adjust the Hero Card text sizes for narrow screens */
    .hero-card {
        padding: 1.5rem;
    }
    .hero-balance {
        font-size: 2.2rem;
    }

    /* 4. Change Services from 4-columns to 3-columns so they breathe */
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 0.75rem;
    }

    /* 5. Slightly shrink the service icons so they fit perfectly */
    .service-icon {
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }
    
    .service-label {
        font-size: 0.7rem;
    }
}