body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f9;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    color: #2c3e50;
    margin: 0;
    padding-bottom: 2px;
    border-bottom: 2px solid #3498db;
}

.limpiar-btn {
    padding: 8px 12px;
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 5px;
    transition: background 0.3s;
}

.descargar-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-top: 15px;
}

.descargar-btn {
    padding: 5px 8px;
    background: transparent;
    color: #7f8c8d;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin: 0;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.descargar-btn:hover {
    background: #f4f4f9;
    color: #2c3e50;
    border-color: #bdc3c7;
}

.limpiar-btn:hover {
    background: #d6dbdf;
}

h2 {
    color: #2c3e50;
    margin-top: 0;
}

.input-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-row label {
    width: 200px;
    font-weight: bold;
}

.form-row input, .form-row select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Contenedor para el botón de densidad */
.densidad-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

/* Botón para densidad */
.toggle-densidad {
    padding: 4px 8px;
    background: #ecf0f1;
    color: #7f8c8d;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.toggle-densidad:hover {
    background: #d6dbdf;
}

/* Ventana modal para densidad */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    margin-top: -10px;
}

.modal-title {
    font-size: 16px;
    color: #2c3e50;
}

.modal-body {
    margin-bottom: 15px;
}

.form-row-modal {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-row-modal label {
    width: 120px;
    font-size: 14px;
}

.input-densidad-modal {
    width: 100px;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.aplicar-btn {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.aplicar-btn:hover {
    background: #2980b9;
}

.cancelar-btn {
    padding: 6px 12px;
    background: #ecf0f1;
    color: #7f8c8d;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cancelar-btn:hover {
    background: #d6dbdf;
}

.tab {
    display: none;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    margin-top: 10px;
}

.tab.active {
    display: block;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tab-buttons button {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.tab-buttons button.active {
    background: #2980b9;
}

input[readonly] {
    background: #eee;
}

/* Oculta los botones de incrementar/decrementar en los inputs de tipo number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Para Firefox */
}

/* Para los dispositivos móviles */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        box-sizing: border-box;
    }

    .form-row label {
        width: 100%;
        margin-bottom: 5px;
        box-sizing: border-box;
    }

    .form-row input,
    .form-row select {
        width: 100%;
        max-width: 100%;
        padding: 8px;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    .tab-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }

    .tab-buttons button {
        flex: 1 1 auto;
        min-width: calc(33% - 5px);
        padding: 8px;
        text-align: center;
    }
}

.footer {
    margin-top: 10px;
    padding: 10px;
    text-align: center;
    font-size: 0.7em;
    color: #666;
}

.footer-link {
    color: #999;
    text-decoration: none;
}

.footer-link:hover {
    color: #666;
}