/* mobile-improvements.css */
/* Mejoras globales de responsividad para Leonix */

@media (max-width: 768px) {

    /* --- Layout General --- */
    #main-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top: 1rem !important;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header>div {
        width: 100%;
    }

    .page-title {
        font-size: 1.5rem !important;
        line-height: 1.2;
    }

    .page-subtitle {
        font-size: 0.875rem !important;
    }

    /* --- Botones de Acción Principal --- */
    .page-header button,
    .page-header .btn-primary {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    /* --- Filtros --- */
    .filters-container {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem !important;
    }

    .filters-container>div {
        flex-wrap: nowrap;
        min-width: min-content;
    }

    .filter-btn {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* --- Stats Grid --- */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .stat-card {
        padding: 1rem !important;
    }

    /* --- Tablas (Standard & Legacy) --- */
    .table-container,
    .overflow-auto,
    .overflow-x-auto {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0.5rem;
        background: var(--card-bg, #ffffff);
    }

    .data-table,
    .overflow-auto table,
    .overflow-x-auto table {
        min-width: 100%;
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td,
    .overflow-auto th,
    .overflow-auto td,
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    /* --- Formularios --- */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Evitar zoom en iOS */
    }

    /* --- Modales --- */
    .modal-container {
        width: 95vw !important;
        max-height: 90vh !important;
        margin: 0 auto;
        padding: 1rem !important;
    }

    .modal-content {
        padding: 1rem !important;
        overflow-y: auto;
        max-height: calc(90vh - 120px);
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .modal-footer button {
        width: 100%;
        margin: 0 !important;
    }

    /* --- Tarjetas --- */
    .card {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

    .card-header {
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    /* --- Reducción de Padding Global --- */
    .p-6,
    .p-8,
    .sm\:p-8 {
        padding: 1rem !important;
    }

    .gap-6 {
        gap: 1rem !important;
    }

    /* --- Utilidades --- */
    .hidden-mobile {
        display: none !important;
    }
}