/* Responsive.css - Layout adjustments for Mobile, Tablets, and Small Screens */

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        padding: 24px 8px;
    }
    
    .sidebar-title,
    .nav-item span,
    .sidebar-footer .nav-item span {
        display: none;
    }
    
    .sidebar-header {
        justify-content: center;
        padding: 0 0 20px 0;
    }
    
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    /* Hide Desktop Sidebar completely */
    .sidebar {
        display: none;
    }
    
    /* Display Mobile Top Bar & Bottom Navigation Bar */
    .mobile-header {
        display: flex;
    }
    
    .mobile-nav-bar {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 16px 84px 16px; /* Extra bottom padding for mobile navigation bar */
    }
    
    /* Header Bar changes */
    .header-bar {
        display: none; /* Let the mobile-header do the work, or keep a simpler version */
    }
    
    /* Grids stack vertically */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px 12px;
        gap: 10px;
    }
    
    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Cards compact padding */
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    /* Responsive Table to Cards conversion on mobile view */
    .mobile-table-card {
        border: 1px solid var(--border-color);
        background-color: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 14px;
        margin-bottom: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-table-card .card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-table-card .card-row .row-label {
        font-weight: 600;
        color: var(--text-muted);
        font-size: 12px;
    }
    
    .mobile-table-card .card-row .row-value {
        font-weight: 500;
        text-align: right;
    }
    
    /* Hide desktop table elements when in card list view */
    .desktop-table-only {
        display: none !important;
    }
    
    /* Form alignment changes */
    .form-row {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* Modal sizing */
    .modal-container {
        width: 95%;
        margin: 10px;
        max-height: 85vh;
    }
    
    /* Chart sizing adjusts */
    .chart-container {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-header {
        padding: 12px;
    }
    
    .main-content {
        padding: 16px 12px 80px 12px;
    }
    
    .btn {
        width: 100%; /* Make buttons full width on small mobile for touch-friendliness */
        margin-bottom: 8px;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
}
