/* Mobile Bottom Nav - Hidden on Desktop */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    width: 20%;
    height: 100%;
    position: relative;
}

.mobile-nav-item.active {
    color: var(--accent-color);
    font-weight: 600;
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20%; right: 20%;
    height: 3px;
    background: var(--accent-color);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.mobile-nav-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* Tablet & Smaller */
@media (max-width: 1200px) {
    .sidebar { width: 200px; }
    .main-wrapper { margin-left: 200px; }
}

/* Mobile Setup */
@media (max-width: 768px) {
    /* Hide desktop sidebar */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        width: 260px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
        padding-bottom: 60px; /* Space for bottom nav */
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Enlarge touch targets */
    .btn, button {
        min-height: 44px;
    }
    
    /* Prevent zoom on iOS inputs */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Horizontal scrolling for tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    /* Adjust grid layouts */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Full screen modals */
    .modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }
    .modal-body {
        flex: 1;
        overflow-y: auto;
    }
    
    /* Adjust topnav for mobile */
    .topnav {
        padding: 12px 16px;
    }
    .breadcrumb {
        font-size: 1.1rem;
    }
}
