/* ==========================================================================
   BIENESTAR 2026 - RESPONSIVE & ADAPTABILIDAD DISPOSITIVOS MÓVILES
   Optimizado para teléfonos, tablets y pantallas de escritorio
   ========================================================================== */

@media (max-width: 1360px) {
    .nav-link {
        padding: 0.5rem 0.65rem;
        font-size: 0.84rem;
        gap: 0.4rem;
    }
    .user-name {
        max-width: 110px;
    }
}

@media (max-width: 1180px) {
    .app-navbar {
        padding: 0 1rem;
    }

    .nav-links {
        display: none; /* Se activa mediante menú móvil */
    }

    .btn-mobile-menu {
        display: block;
    }

    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-medium);
        padding: 1.25rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
        z-index: 9999;
    }

    .nav-link {
        width: 100%;
        padding: 0.85rem 1.2rem;
        font-size: 0.95rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .app-main {
        padding: 1.25rem 1rem 3rem 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .page-actions {
        width: 100%;
        justify-content: stretch;
    }

    .page-actions .btn {
        flex: 1;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-card {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .search-input-wrapper {
        min-width: 100%;
    }

    .toolbar-filters {
        flex-direction: column;
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .drawer-panel {
        max-width: 100%;
    }

    .user-name {
        display: none;
    }

    .category-tabs {
        padding: 0.75rem 1rem 0 1rem;
    }

    .drawer-top-grid {
        grid-template-columns: 1fr;
        padding: 1rem 1rem 0 1rem;
        gap: 1rem;
    }

    .drawer-header {
        padding: 1.25rem 1rem;
    }

    .drawer-body {
        padding: 1.25rem 1rem;
        grid-template-columns: 1fr;
    }

    .drawer-footer {
        padding: 1rem;
    }

    #toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Modo Impresión */
@media print {
    .app-navbar, .toolbar-card, .pagination-container, .btn, .app-footer {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .table-card {
        border: none;
        box-shadow: none;
    }

    .data-table th, .data-table td {
        color: #000000 !important;
        border-color: #cccccc !important;
    }
}
