/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .login-box { grid-template-columns: 1fr; }
    .login-info { display: none; }
}

@media (max-width: 768px) {
    .dashboard-container { flex-direction: column; }
    
    .sidebar {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        z-index: 90;
        border-radius: 0 0 1.5rem 1.5rem;
        box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2);
    }
    
    .sidebar.active {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .main-content {
        padding: 1.5rem;
        margin-top: 0;
    }
    
    .mobile-menu-toggle { display: flex; }
    
    .mobile-overlay.active {
        display: block;
        z-index: 88;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card { padding: 1rem; }
    
    .chat-widget {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        z-index: 2000;
    }
    
    .chat-widget .chat-header { cursor: default; }
    
    .nav-center .info {
        display: none;
    }
    
    .profile-info {
        display: none;
    }
    
    .card { padding: 1rem; }
    
    .ai-recommendations {
        grid-template-columns: 1fr;
    }
    
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .table-responsive {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem;
    }
    
    h3 { font-size: 1.2rem; }
    
    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dashboard-nav {
        padding: 0.75rem 1rem;
    }
    
    .nav-left .logo h2 {
        font-size: 1rem;
    }
    
    .profile {
        padding: 0.25rem 0.75rem;
    }
    
    .profile img {
        width: 32px;
        height: 32px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
}