/* ============================================
   ESTILOS RESPONSIVE PARA LUGAR DE LUZ
   ============================================ */

@media (max-width: 768px) {
    
    /* ============================================
       1. BOTONES MÁS GRANDES Y VISIBLES
       ============================================ */
    
    .btn,
    .btn-principal,
    .btn-secundario,
    .btn-volver,
    .btn-legal,
    .btn-descargar,
    .btn-aprobar,
    .btn-rechazar,
    .btn-eliminar,
    .btn-cargar,
    .btn-imprimir,
    .btn-whatsapp-receta,
    .btn-pdf-receta,
    .btn-imprimir-receta {
        min-height: 56px !important;
        padding: 16px 24px !important;
        font-size: 1.05rem !important;
        border-radius: 50px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    /* ============================================
       2. ACCIONES RÁPIDAS (Dashboard)
       ============================================ */
    
    .acciones-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .accion-card {
        padding: 22px 20px !important;
        min-height: 80px !important;
    }
    
    .accion-icono {
        font-size: 2.5rem !important;
    }
    
    .accion-texto strong {
        font-size: 1.1rem !important;
    }
    
    .accion-texto small {
        font-size: 0.9rem !important;
    }
    
    /* ============================================
       3. TIPOGRAFÍA
       ============================================ */
    
    body {
        font-size: 16px !important;
    }
    
    h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
    
    /* ============================================
       4. CARDS Y CONTENEDORES
       ============================================ */
    
    .card,
    .card-modern,
    .contenedor,
    .bienvenida {
        padding: 25px 20px !important;
        border-radius: 20px !important;
    }
    
    /* ============================================
       5. TABLAS (que no se desborden)
       ============================================ */
    
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        font-size: 0.85rem !important;
    }
    
    th, td {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
    }
    
    /* ============================================
       6. FORMULARIOS
       ============================================ */
    
    input,
    textarea,
    select {
        font-size: 16px !important; /* Evita zoom en iOS */
        padding: 14px 16px !important;
        min-height: 50px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .form-group {
        margin-bottom: 18px !important;
    }
    
    label {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
    }
    
    /* ============================================
       7. HEADER Y NAVEGACIÓN
       ============================================ */
    
    .header {
        padding: 12px 15px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .logo {
        font-size: 1.2rem !important;
    }
    
    .btn-volver {
        font-size: 0.85rem !important;
        padding: 10px 16px !important;
        width: auto !important;
        min-height: auto !important;
    }
    
    /* ============================================
       8. MODALES
       ============================================ */
    
    .modal-dialog {
        margin: 10px !important;
    }
    
    .modal-content {
        border-radius: 20px !important;
    }
    
    /* ============================================
       9. ESTADÍSTICAS (Dashboard admin)
       ============================================ */
    
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    .stat-card {
        padding: 20px 15px !important;
    }
    
    .stat-valor {
        font-size: 2rem !important;
    }
    
    /* ============================================
       10. FOTOS Y AVATARES
       ============================================ */
    
    .foto-fallecido img,
    .foto-fallecido .sin-foto {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* ============================================
       11. SEPARADORES
       ============================================ */
    
    .separador {
        margin: 25px auto !important;
        max-width: 250px !important;
    }
    
    /* ============================================
       12. DESCRIPCIÓN
       ============================================ */
    
    .descripcion {
        font-size: 0.95rem !important;
        padding: 0 10px !important;
    }
    
    .subtitulo {
        font-size: 0.9rem !important;
    }
    
    /* ============================================
       13. BOTONES LEGALES
       ============================================ */
    
    .botones-legales {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .btn-legal {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
        font-size: 0.9rem !important;
    }
    
    /* ============================================
       14. FOOTER
       ============================================ */
    
    .footer {
        padding: 25px 15px !important;
        font-size: 0.8rem !important;
    }
    
    /* ============================================
       15. TABLA DE COMENTARIOS
       ============================================ */
    
    .comentario-card {
        padding: 15px !important;
    }
    
    .comentario-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    /* ============================================
       16. MODAL DE PAGO
       ============================================ */
    
    #modalPago > div {
        padding: 30px 20px !important;
        margin: 10px !important;
    }
}

/* ============================================
   PANTALLAS MUY CHICAS (< 400px)
   ============================================ */

@media (max-width: 400px) {
    h1 {
        font-size: 1.3rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn {
        font-size: 0.95rem !important;
        padding: 14px 18px !important;
    }
}