/* ==========================================================================
   MOBILE.CSS - Responsividade para Tablets e Celulares
   Este arquivo centraliza as regras de layout para dispositivos móveis.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TABLETS (Até 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    /* Estrutura principal */
    .app-frame {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .app-sidebar {
        width: 100% !important;
        height: auto !important;
        position: static !important;
        padding: 1rem !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    }
    
    .brand-block {
        margin-bottom: 1rem;
    }

    /* Grids e Layouts de dados */
    .data-grid,
    .feature-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    /* Tabelas com barra de rolagem horizontal */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
}

/* --------------------------------------------------------------------------
   CELULARES GRANDES / TABLETS PEQUENOS (Até 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Ajustes globais de espaçamento */
    .page-shell, .app-content {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }

    /* Grids para uma coluna */
    .data-grid,
    .feature-grid {
        grid-template-columns: 1fr !important;
    }

    /* Ocultar elementos marcados para desktop */
    .hide-on-mobile {
        display: none !important;
    }
    
    /* Otimização de botões nos formulários */
    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-actions {
        display: flex;
        flex-direction: column;
    }
    
    /* Footer Fixo */
    .app-footer {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 1rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px !important;
    }
}

/* --------------------------------------------------------------------------
   CELULARES PEQUENOS (Até 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
    /* Redução de Fontes */
    h1, .h1 { font-size: 1.5rem !important; }
    h2, .h2 { font-size: 1.25rem !important; }
    h3, .h3 { font-size: 1.1rem !important; }
    
    /* Elementos menores na navegação */
    .user-nav-btn {
        padding: 0.5rem !important;
    }
    
    /* Botão do whatsapp flutuante otimizado para não atrapalhar a tela */
    .whatsapp-float {
        width: 40px !important;
        height: 40px !important;
        right: 16px !important;
        bottom: 16px !important;
    }
    
    .whatsapp-float svg {
        width: 24px !important;
        height: 24px !important;
    }
}
