/* This is your complete original stylesheet */
:root {
    --primary-color: #0d6efd; --secondary-color: #6c757d; --success-color: #198754; --danger-color: #dc3545; --warning-color: #ffc107; --light-color: #f8f9fa; --dark-color: #212529; --font-family: 'Inter', sans-serif;
}
body {
    font-family: var(--font-family); background-color: var(--light-color); color: var(--dark-color); margin: 0; display: flex; flex-direction: column; min-height: 100vh;
}
.auth-container {
    max-width: 450px; margin: 5% auto; padding: 2rem; background-color: #fff; border-radius: 15px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.main-content {
    flex: 1; padding: 2rem; max-width: 1200px; margin: 0 auto; width: 100%;
}
.main-header {
    background-color: #fff; padding: 1rem 2rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); display: flex; justify-content: space-between; align-items: center;
}
.main-header .logo {
    font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none;
}
.main-nav a {
    text-decoration: none; color: var(--secondary-color); margin: 0 1rem; font-weight: 500; transition: color 0.3s ease;
}
.main-nav a:hover, .main-nav .active { color: var(--primary-color); }
.user-menu { position: relative; }
.user-menu-btn { background: none; border: none; cursor: pointer; font-size: 1.5rem; }
.user-menu-dropdown {
    display: none; position: absolute; right: 0; background-color: #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.1); border-radius: 8px; min-width: 220px; z-index: 1000; list-style: none; padding: 0.5rem 0;
}
.user-menu-dropdown.show { display: block; }
.user-menu-dropdown a { display: block; padding: 0.75rem 1.5rem; text-decoration: none; color: var(--dark-color); display: flex; align-items: center; gap: 0.75rem; }
.user-menu-dropdown a:hover { background-color: var(--light-color); }
.user-menu-dropdown .divider { height: 1px; background-color: #eee; margin: 0.5rem 0; }
h1, h2, h3 { color: var(--dark-color); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid #ced4da; border-radius: 8px; font-size: 1rem; box-sizing: border-box; }
.btn { padding: 0.8rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; transition: background-color 0.3s ease; }
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: #0b5ed7; }
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }
.error-message { background-color: #f8d7da; color: #842029; padding: 1rem; border: 1px solid #f5c2c7; border-radius: 8px; margin-bottom: 1.5rem; text-align: center; }
.success-message { background-color: #d1e7dd; color: #0f5132; padding: 1rem; border: 1px solid #badbcc; border-radius: 8px; margin-bottom: 1.5rem; text-align: center; }
.floating-support-btn { position: fixed; bottom: 25px; right: 25px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 1000; text-decoration: none; transition: transform 0.3s ease; }
.floating-support-btn:hover { transform: scale(1.1); text-decoration: none; }
@media (max-width: 768px) { .main-header { gap: 1rem; } .auth-container { margin: 5% 1rem; padding: 1.5rem; } }
.dashboard-greeting, .section-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 1.5rem; border-bottom: 2px solid #eee; padding-bottom: 0.75rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card { background-color: #fff; padding: 1.5rem; border-radius: 15px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); display: flex; align-items: center; gap: 1.5rem; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); }
.card-icon { font-size: 2.5rem; padding: 1rem; background-color: var(--light-color); border-radius: 50%; }
.stat-info { display: flex; flex-direction: column; }
.stat-title { font-size: 1rem; color: var(--secondary-color); margin-bottom: 0.25rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--dark-color); }
.quick-actions-container { margin-bottom: 3rem; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
.action-card { background-color: #fff; padding: 1.5rem; border-radius: 15px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-decoration: none; color: var(--dark-color); font-weight: 500; text-align: center; transition: all 0.3s ease; }
.action-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); color: var(--primary-color); text-decoration: none; }
.action-icon { font-size: 2.5rem; color: var(--primary-color); }
.transactions-container, .page-container { background-color: #fff; padding: 2rem; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.auth-logo { text-align: center; margin-bottom: 1.5rem; } .auth-logo img { width: 140px; }
.auth-divider { text-align: center; margin: 1.5rem 0; position: relative; color: #aaa; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background-color: #ddd; }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }
.btn-google { background-color: #fff; color: #444; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem; }
.btn-google:hover { background-color: #f8f8f8; text-decoration: none; }
.btn-google .fab { color: #DB4437; font-size: 1.2rem; }
.investment-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.balance-display { background-color: #fff; padding: 0.75rem 1.5rem; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); font-weight: 500; }
.balance-display span { font-weight: 700; color: var(--success-color); }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.plan-card { background-color: #fff; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.plan-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.plan-card-header { background-color: var(--primary-color); color: #fff; padding: 1.5rem; text-align: center; }
.plan-card-header h3 { margin: 0; font-size: 1.5rem; color: #fff; }
.plan-card-body { padding: 2rem; text-align: center; flex-grow: 1; }
.daily-return { font-size: 2.5rem; font-weight: 700; margin: 0 0 1.5rem 0; color: var(--dark-color); }
.daily-return span { font-size: 1.2rem; font-weight: 500; color: var(--secondary-color); }
.plan-details { display: flex; justify-content: space-around; text-align: center; border-top: 1px solid #eee; padding-top: 1.5rem; }
.plan-details div { display: flex; flex-direction: column; } .plan-details span { color: var(--secondary-color); margin-bottom: 0.25rem; font-size: 0.9rem; } .plan-details strong { font-size: 1.1rem; font-weight: 700; }
.plan-card-footer { padding: 1.5rem; background-color: var(--light-color); }
.transactions-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.transactions-table th, .transactions-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
.transactions-table th { font-weight: 500; color: var(--secondary-color); font-size: 0.9rem; text-transform: uppercase; }
.transactions-table tbody tr:last-child td { border-bottom: none; }
.text-danger { color: var(--danger-color) !important; font-weight: 700; } .text-success { color: var(--success-color) !important; font-weight: 700; }
.badge { padding: 0.3rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: 700; text-transform: capitalize; color: #fff; }
.badge.status-completed, .badge.type-deposit { background-color: var(--success-color); } .badge.status-pending { background-color: var(--warning-color); color: var(--dark-color); } .badge.status-failed, .badge.status-cancelled, .badge.type-withdrawal { background-color: var(--danger-color); } .badge.type-investment { background-color: var(--primary-color); } .badge.type-daily-return, .badge.type-referral-commission { background-color: #17a2b8; }
.pagination { margin-top: 2rem; text-align: center; } .pagination a { color: var(--primary-color); padding: 0.5rem 1rem; text-decoration: none; transition: background-color .3s; border: 1px solid #ddd; margin: 0 4px; border-radius: 5px; } .pagination a.active { background-color: var(--primary-color); color: white; border: 1px solid var(--primary-color); } .pagination a:hover:not(.active) { background-color: #ddd; }
/* ===================================================================
   MOBILE & TABLET STYLES (UPDATED)
=================================================================== */

/* --- Default State (Hidden on Desktop) --- */
.mobile-nav, .more-menu-panel, .overlay, .mobile-menu-toggle {
    display: none;
}


/* --- Tablet & Mobile View (max-width: 768px) --- */
@media (max-width: 768px) {
    /* 1. LAYOUT & HEADER ADJUSTMENTS
    ------------------------------------------- */
    body {
        /* Add space at the bottom for the fixed nav bar */
        padding-bottom: 75px; 
    }

    .main-header {
        /* Make header sticky */
        position: sticky;
        top: 0;
        z-index: 1010;
        background-color: #fff; /* Ensure it has a background when scrolling */

        /* Layout for Logo + Menu Button */
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem; /* Adjust padding for mobile */
        height: 60px;
    }
    
    .main-content {
         padding: 1.5rem 1rem;
         /* Add padding to prevent content from hiding under sticky header */
         padding-top: 1.5rem; 
    }

    /* Show mobile menu toggle button */
    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--dark-color);
        background: none;
        border: none;
        cursor: pointer;
    }

    /* Hide Desktop Elements */
    .main-header .main-nav,
    .main-header .user-menu {
        display: none;
    }

    /* Hide original footer text */
    footer.text-center {
        display: none; 
    }


    /* 2. DASHBOARD-SPECIFIC TWEAKS
    ------------------------------------------- */
    /* Hide specific quick action cards */
    .action-card.mobile-hide {
        display: none;
    }
    
    /* Make the transactions table scrollable */
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }


    /* 3. BOTTOM NAVIGATION BAR
    ------------------------------------------- */
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 1px solid #e9ecef;
    }

    .mobile-nav a {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 5px;
        text-decoration: none;
        color: var(--secondary-color);
        font-size: 0.7rem;
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .mobile-nav a i {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .mobile-nav a.active {
        color: var(--primary-color);
        font-weight: 700;
    }


    /* 4. SLIDE-IN MENU PANEL (was "More" menu)
    ------------------------------------------- */
    .more-menu-panel {
        display: block;
        position: fixed;
        /* Change from bottom to top/right */
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background-color: #fff;
        z-index: 1020;
        box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        /* Change transform for slide-in from right */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .more-menu-panel.show {
        transform: translateX(0);
    }

    .more-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1.5rem;
        height: 60px; /* Match header height */
        border-bottom: 1px solid #eee;
    }
    
    .more-menu-header h3 { margin: 0; font-size: 1.2rem; }

    #close-more-menu-btn {
        background: none; border: none; font-size: 2rem; font-weight: 300;
        color: var(--secondary-color); cursor: pointer; line-height: 1;
    }

    .more-menu-content { padding: 1rem; }

    .more-menu-content a {
        display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1rem;
        text-decoration: none; color: var(--dark-color); font-size: 1rem;
        font-weight: 500; border-radius: 8px;
    }
    
    .more-menu-content a i { width: 20px; color: var(--secondary-color); }
    .more-menu-content a:hover { background-color: var(--light-color); color: var(--primary-color); }
    .more-menu-content .divider { height: 1px; background-color: #eee; margin: 0.5rem 0; }
    

    /* 5. OVERLAY FOR MENU
    ------------------------------------------- */
    .overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1015; /* Between header and menu panel */
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }

    .overlay.show {
        opacity: 1;
        pointer-events: auto;
    }
}
/* ==========================================================
   MOBILE UI POLISH & FIXES
========================================================== */
@media (max-width: 768px) {

    /* Fix #1: Force header to align items on one line */
    .main-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem; /* Consistent padding */
    }

    /* Fix #2: Move WhatsApp button above the bottom nav bar */
    .floating-support-btn {
        bottom: 85px; /* Increase bottom position */
    }

    /* Fix #3: Hide specific quick action cards on mobile */
    .action-card.mobile-hide {
        display: none;
    }

    /* Optional: Make the two remaining cards look better */
    .actions-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }
}
/* ==========================================================
   MOBILE UI POLISH & FIXES
========================================================== */
@media (max-width: 768px) {

    /* This is the key fix: It forces the header items onto one line */
    .main-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem; /* Adds some space on the sides */
    }

    /* This moves the WhatsApp button up so it's visible */
    .floating-support-btn {
        bottom: 85px; 
    }

    /* This hides the extra Quick Action cards on mobile */
    .action-card.mobile-hide {
        display: none;
    }

    /* This makes the remaining two cards look better */
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}