/* Mobile Navigation Styles */

/* Desktop Navbar - Hide on Mobile */
.desktop-navbar {
    display: flex;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
}

.notification-btn {
    position: relative;
    padding: 0.5rem;
    color: var(--dark);
    font-size: 1.25rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Sidebar Drawer */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.mobile-sidebar.active {
    pointer-events: auto;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-sidebar.active .sidebar-overlay {
    opacity: 1;
}

.sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-sidebar.active .sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 2rem 1.5rem;
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-status {
    font-size: 0.875rem;
    opacity: 0.9;
}

.badge-admin {
    background: var(--danger);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.badge-user {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.sidebar-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: var(--light);
    color: var(--primary);
}

.sidebar-item i {
    width: 24px;
    font-size: 1.25rem;
}

.sidebar-item.admin-item {
    color: var(--danger);
}

.sidebar-item.logout-item {
    color: var(--danger);
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 1.5rem;
}

.sidebar-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FIXED MOBILE BOTTOM NAVIGATION - APP STYLE ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 9998;
    height: 65px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0;
    /* No rounded corners */
    /* Prevent any movement */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    height: 100%;
}

.bottom-nav-item i {
    font-size: 1.35rem;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
}

.bottom-nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: #667eea;
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Active indicator dot */
.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
}

/* Wallet button special styling (center button) */
.bottom-nav-item-main {
    color: #667eea;
}

.bottom-nav-item-main i {
    font-size: 1.5rem;
    color: #667eea;
}

.bottom-nav-item-main span {
    color: #667eea;
    font-weight: 700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    /* Hide desktop navbar */
    .desktop-navbar {
        display: none !important;
    }

    /* Show mobile header */
    .mobile-header {
        display: flex;
    }

    /* Show bottom navigation */
    .bottom-nav {
        display: flex;
    }

    /* Adjust main content for bottom nav */
    .main-content {
        padding-bottom: 80px;
        min-height: calc(100vh - 130px);
    }

    /* Hide desktop menu on mobile */
    .desktop-menu {
        display: none !important;
    }

    .navbar-actions .mobile-menu-btn {
        display: block;
    }

    /* Adjust dashboard for mobile */
    .dashboard-container {
        padding: 1rem;
        padding-bottom: 80px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .action-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .bonus-days {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
    }

    .bonus-day {
        padding: 0.75rem 0.5rem;
    }

    /* Adjust footer for mobile */
    .footer {
        margin-bottom: 60px;
    }

    /* Flash message position */
    .flash-message {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .action-cards {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 2rem;
    }

    .bottom-nav-item span {
        font-size: 0.65rem;
    }

    .bottom-nav-item i {
        font-size: 1.25rem;
    }
}