.tabla-cotizaciones-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    color: #000;
}

.header-cotizacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-cotizacion h2 {
    margin: 0;
    color: #000;
}

.stats-cotizacion {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-item {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    font-size: 14px;
}

.stat-item strong {
    color: #3498db;
    font-size: 18px;
    margin-left: 5px;
}

/* Filtros de búsqueda */
.filtros-busqueda {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filtro-group {
    flex: 1;
    min-width: 200px;
}

#filtro-subcategoria-wrapper {
    animation: tabla-slideIn 0.3s ease-out;
}

@keyframes tabla-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filtro-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.filtro-group input,
.filtro-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #000;
    background: white;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.filtro-group input:focus,
.filtro-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.btn-limpiar {
    padding: 12px 25px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
    height: fit-content;
}

.btn-limpiar:hover {
    background: #7f8c8d;
}

.tabla-cotizaciones-container {
    overflow-x: auto;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.acciones-tabla {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.btn-accion {
    padding: 10px 18px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-accion:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-exportar {
    background: #27ae60;
}

.btn-exportar:hover {
    background: #229954;
}

.paginacion-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
    gap: 15px;
}

.info-productos {
    flex: 1;
    min-width: 200px;
}

.selector-paginas {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selector-paginas label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

#items-por-pagina {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    color: #000;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 150px;
}

#items-por-pagina:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

#items-por-pagina:hover {
    border-color: #3498db;
}

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

.btn-pagina {
    padding: 8px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-pagina:hover:not(:disabled) {
    background: #2980b9;
}

.btn-pagina:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

#info-pagina {
    font-weight: 600;
    color: #555;
}

.tabla-cotizaciones {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.tabla-cotizaciones thead {
    background: #2c3e50;
    color: white;
}

.tabla-cotizaciones th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #fff;
}

.tabla-cotizaciones th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.2s;
}

.tabla-cotizaciones th.sortable:hover {
    background: #34495e;
}

.sort-icon {
    margin-left: 5px;
    opacity: 0.5;
    font-size: 12px;
}

.sortable.sort-asc .sort-icon::before {
    content: '↑';
    opacity: 1;
    font-size: 14px;
}

.sortable.sort-desc .sort-icon::before {
    content: '↓';
    opacity: 1;
    font-size: 14px;
}

.sortable.sort-asc .sort-icon,
.sortable.sort-desc .sort-icon {
    display: none;
}

.sortable.sort-asc::after {
    content: ' ↑';
    margin-left: 5px;
    font-weight: bold;
}

.sortable.sort-desc::after {
    content: ' ↓';
    margin-left: 5px;
    font-weight: bold;
}

.tabla-cotizaciones td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #000;
}

.tabla-cotizaciones td.sin-stock {
    color: #e74c3c;
    font-weight: 600;
}

.stock-max {
    display: block;
    color: #7f8c8d;
    font-size: 11px;
    margin-top: 3px;
}

.tabla-cotizaciones tbody tr:hover {
    background: #f8f9fa;
}

.tabla-cotizaciones img {
    display: block;
    border-radius: 4px;
    object-fit: cover;
}

.loading-productos {
    text-align: center;
    padding: 40px !important;
    color: #666;
}

.producto-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.cantidad-producto {
    width: 100%;
    min-width: 80px;
    max-width: 120px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    background: white;
    transition: border-color 0.3s;
}

.cantidad-producto:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.cantidad-producto:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
    border-color: #e0e0e0;
}

/* Remover flechas de input number */
.cantidad-producto::-webkit-outer-spin-button,
.cantidad-producto::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cantidad-producto[type=number] {
    -moz-appearance: textfield;
}

.cotizacion-resumen {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    color: #000;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cotizacion-resumen h3 {
    margin-top: 0;
    color: #000;
}

.sin-productos {
    color: #666;
    font-style: italic;
}

.lista-productos-seleccionados {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.lista-productos-seleccionados li {
    padding: 10px;
    background: white;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    color: #000;
}

.total-cotizacion {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

.desglose-precios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.linea-precio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #333;
}

.linea-precio.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #27ae60;
    font-size: 20px;
}

.linea-precio.total strong {
    color: #27ae60;
}

#neto-cotizacion,
#iva-cotizacion {
    color: #555;
    font-weight: 600;
}

#total-cotizacion {
    color: #27ae60;
    font-size: 22px;
    font-weight: bold;
}

.formulario-cotizacion {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.formulario-cotizacion h3 {
    margin-top: 0;
    color: #000;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #000;
    background: white;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: Arial, sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-enviar-cotizacion {
    background: #27ae60;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.btn-enviar-cotizacion:hover {
    background: #229954;
}

.btn-enviar-cotizacion:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.mensaje-respuesta {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    display: none;
    font-weight: 600;
}

.mensaje-respuesta.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-respuesta.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje-respuesta.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.mensaje-respuesta.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive */
@media (max-width: 767px) {
    .tabla-cotizaciones-wrapper {
        padding: 10px;
    }
    
    .header-cotizacion {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filtros-busqueda {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtro-group {
        min-width: 100%;
    }
    
    #filtro-subcategoria-wrapper {
        min-width: 100%;
    }
    
    .paginacion-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-productos {
        width: 100%;
    }
    
    .selector-paginas {
        width: 100%;
        justify-content: space-between;
    }
    
    #items-por-pagina {
        flex: 1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .acciones-tabla {
        flex-direction: column;
    }
    
    .btn-accion {
        width: 100%;
    }
    
    .tabla-cotizaciones th,
    .tabla-cotizaciones td {
        padding: 8px;
        font-size: 14px;
    }
    
    .tabla-cotizaciones img {
        width: 40px !important;
    }
}
