body {
    font-family: Arial, sans-serif;
    padding: 20px;
    margin: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    margin-bottom: 20px;
    color: #333;
}

/* Pestañas */
.tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tabs a {
    display: inline-block;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    margin-right: 5px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tabs a.active {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
}

/* Contenido de pestañas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Formulario */
form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
}

button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Tabla */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #4CAF50;
    color: white;
}

/* Botones de acción */
.btn-editar {
    background-color: #ffc107;
    color: black;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-eliminar {
    background-color: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Estilos para informes */
.cards-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.info-card {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-title {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.card-value {
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.date-search-section {
    margin-top: 40px;
}

.date-inputs {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.date-field {
    flex: 1;
}

.date-field label {
    display: block;
    color: #666;
    margin-bottom: 5px;
}

.btn-buscar {
    background-color: #3498db;
    color: white;
}

.btn-limpiar {
    background-color: #95a5a6;
    color: white;
}

/* DataTables personalización */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

table.dataTable thead th {
    background-color: #4CAF50;
    color: white;
}

/* Diseño responsivo */
@media (max-width: 768px) {
    form {
        flex-direction: column;
    }
    
    input, button {
        width: 100%;
    }
    
    .cards-row {
        flex-direction: column;
    }
    
    .date-inputs {
        flex-direction: column;
    }
    
    .info-card {
        margin-bottom: 10px;
    }
}
/* Estilos para tarjetas de datos en móvil */
.card-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
}

.data-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-field {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.card-field:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: bold;
    color: #333;
}

.field-value {
    color: #555;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.btn-actualizar {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-eliminar {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* Estilos para la barra de búsqueda */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .search-container {
        flex-direction: row;
    }
    
    .search-container input {
        flex: 1;
    }
}

.search-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.search-actions {
    display: flex;
    gap: 10px;
}

.btn-buscar {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
}

.btn-ver-todos {
    background-color: #7f8c8d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
}

/* Diseño responsivo adicional */
@media (max-width: 480px) {
    .card-field {
        flex-direction: column;
        gap: 5px;
    }
    
    .card-actions {
        justify-content: space-between;
    }
    
    .btn-actualizar, .btn-eliminar {
        flex: 1;
        text-align: center;
    }
}
/* Estilos responsivos generales */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    /* Formulario responsivo */
    form {
        flex-direction: column;
    }
    
    input, textarea, button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Ocultar tabla en móvil */
    .desktop-view {
        display: none;
    }
    
    /* Mostrar tarjetas en móvil */
    .mobile-view {
        display: block;
    }
    
    /* Estilos para tabs */
    .tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabs a {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Tarjetas de informe */
    .cards-row {
        flex-direction: column;
    }
    
    .info-card {
        margin-bottom: 15px;
    }
    
    /* Modales más ajustados */
    .modal-dialog {
        margin: 10px;
    }
}

/* Estilos específicos para dispositivos muy pequeños */
@media (max-width: 400px) {
    .tabs a {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .card-actions button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Estilos para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .desktop-view {
        display: block;
    }
    
    .mobile-view {
        display: none;
    }
    
    .info-card {
        padding: 15px;
    }
}

/* Vista por defecto para escritorio */
@media (min-width: 1025px) {
    .desktop-view {
        display: block;
    }
    
    .mobile-view {
        display: none;
    }
}

/* Mejoras adicionales para la experiencia móvil */

/* Mostrar un encabezado de sección más claro */
.tab-content h2.mobile-title {
    display: none;
}

@media (max-width: 768px) {
    .tab-content h2.mobile-title {
        display: block;
        text-align: center;
        margin: 10px 0 20px;
        font-size: 18px;
        color: #333;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }
    
    /* Mejorar el aspecto del input de precio de venta */
    .precio-venta-mobile {
        background-color: #f9f9f9;
        border: 1px solid #2ecc71 !important;
        font-weight: bold;
        color: #2ecc71;
    }
    
    /* Añadir más espacio entre tarjetas */
    .card-container {
        gap: 20px;
    }
    
    /* Mejorar la legibilidad de valores */
    .field-value {
        font-size: 15px;
    }
    
    /* Destacar campos importantes */
    .field-label {
        color: #666;
        font-size: 14px;
    }
    
    /* Hacer que las tarjetas se vean más como la imagen de referencia */
    .data-card {
        border-left: 4px solid #3498db;
    }
    
    /* Mensaje cuando no hay resultados */
    .no-data {
        text-align: center;
        padding: 20px;
        color: #777;
        background-color: #f9f9f9;
        border-radius: 8px;
        margin-top: 20px;
    }
    
    /* Hacer que los formularios sean más agradables en móvil */
    form input, form textarea {
        margin-bottom: 15px;
    }
    
    form button[type="submit"] {
        background-color: #2ecc71;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    @media (max-width: 1200px) {
    .cards-row {
        flex-wrap: wrap;
    }
    
    .info-card {
        flex: 1 0 30%; /* Permite que 3 tarjetas ocupen una fila */
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .info-card {
        flex: 1 0 45%; /* Permite que 2 tarjetas ocupen una fila en tablets */
    }
}

@media (max-width: 480px) {
    .info-card {
        flex: 1 0 100%; /* Una tarjeta por fila en móviles pequeños */
    }
}
}