/* Mobile Optimizations for Gestion Bio */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .main-content {
        padding: 1rem !important;
        padding-top: 70px !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    .content-area {
        padding: 0 !important;
        width: 100% !important;
    }

    .glass-panel {
        padding: 1rem !important;
        width: 100% !important;
    }

    /* Tables to Cards */
    .table-container {
        overflow-x: hidden !important;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 1.5rem;
        background: var(--bg-card);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    td {
        border: none !important;
        padding: 0.5rem 0 !important;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }

    td:before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.75rem;
        color: var(--text-secondary);
        text-transform: uppercase;
    }

    /* Action buttons */
    td[data-label="Acciones"]>div {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    .btn-icon {
        height: 44px !important;
    }

    /* Forms */
    .add-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .add-form>div {
        width: 100% !important;
    }

    input,
    select,
    textarea {
        width: 100% !important;
        font-size: 16px !important;
    }

    /* Grids */
    .grid-2-cols,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* Top bar */
    .top-bar {
        flex-direction: column !important;
        gap: 1rem;
    }

    /* KPIs */
    .kpi-card {
        padding: 0.5rem !important;
    }

    .kpi-icon {
        width: 30px !important;
        height: 30px !important;
    }
}