<div class="accordion accordion-bordered mt-3" id="accordionOtProgress">
    <div class="card accordion-item active">
        <h2 class="accordion-header">
            <button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionOtProgressTip" aria-expanded="false" aria-controls="accordionOtProgressTip">

                <div class="d-flex flex-row justify-content-start align-items-stretch gap-2">
                    <span><i class="ti-list-details ti-md ti"></i></span>
                    <h4> Progreso </h4>
                </div>
            </button>
        </h2>

        <div id="accordionOtProgressTip" class="accordion-collapse collapse show" data-bs-parent="#accordionOtProgress">
            <div class="accordion-body">
                <div class="row justify-content-start align-items-center">
                    <div class="col-md-8 mb-3">
                        <label class="form-label" for="ot-progress-bar-parent"><?= @lang("App.progress") ?></label>
                        <div class="progress" style="height: 25px;" id="ot-progress-bar-parent">
                            <div id="ot-progress-bar" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                    </div>
                    <div class="col-md-2 col-6">
                        <div class="d-flex align-items-center">
                            <div class="badge rounded-pill bg-label-primary me-3 p-2">
                                <i class="ti ti-clock ti-lg"></i>
                            </div>
                            <div class="card-info">
                                <h5 class="mb-0 tiempo-estimado" id="ot-tiempo-estimado"><?= $tiempo_estimado ?></h5>
                                <span class="fx-large"><?= @lang("Produccion.tiempo_estimado") ?></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-2 col-6">
                        <div class="d-flex align-items-center">
                            <div class="badge rounded-pill bg-label-warning me-3 p-2">
                                <i class="ti ti-clock ti-lg"></i>
                            </div>
                            <div class="card-info">
                                <h5 class="mb-0 tiempo-estimado" id="tiempo-total"></h5>
                                <span class="fx-large"><?= @lang("Produccion.tiempo_consumido") ?></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row mb-2">
                    <div class="col-md-3  <?= $user_dates["pre_formato_at"] || $user_dates["pre_lomo_at"] || $user_dates["pre_solapa_at"] || $user_dates["pre_codbarras_at"] || $user_dates["pre_imposicion_at"] ? "" : "d-none" ?>">
                        <!-- PREIMPRESION -->
                        <!-- Preformato  -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <h4><?= lang("Produccion.progress_preimpresion") ?></h4>
                        </div>
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_formato ? "" : "d-none" ?>">
                            <label for="ot-preformato-btn" class="form-label"><?= @lang("Produccion.pre_formato") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["pre_formato_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
                        </div>
                        <!-- Prelomo -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_lomo ? "" : "d-none" ?>">
                            <label for="ot-prelomo-btn" class="form-label"><?= @lang("Produccion.pre_lomo") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["pre_lomo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Presolapa -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_solapa ? "" : "d-none" ?>">
                            <label for="ot-presolapa-btn" class="form-label"><?= @lang("Produccion.pre_solapa") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["pre_solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Precodbarras -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_codigo_barras ? "" : "d-none" ?>">
                            <label for="ot-precodbarras-btn" class="form-label"><?= @lang("Produccion.pre_codbarras") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["pre_codbarras_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Preimposicion -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->realizar_imposicion ? "" : "d-none" ?>">
                            <label for="ot-preimposicion-btn" class="form-label"><?= @lang("Produccion.pre_imposicion") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["pre_imposicion_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                    </div>
                    <div class="col-md-3  <?= $presupuesto->ferro ? "" : "d-none" ?>">
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <h4><?= lang("Produccion.progress_ferro") ?></h4>
                        </div>
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
                            <label for="ot-pendiente-ferro" class="form-label"><?= @lang("Produccion.pendiente_ferro") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
                            <label for="ot-ferro-cliente" class="form-label"><?= @lang("Produccion.ferro_cliente") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
                            <label for="ot-ferro-ok" class="form-label"><?= @lang("Produccion.ferro_ok") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["ferro_ok_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                    </div>
                    <div class="col-md-3">
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <h4><?= lang("Produccion.progress_impresion") ?></h4>
                        </div>
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isBN"] ? "" : "d-none" ?>">
                            <label for="ot-impresion-color" class="form-label"><?= @lang("Produccion.impresion_bn") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_bn_at" id="ot-impresion-bn" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["interior_bn_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isColor"] ? "" : "d-none" ?>"">
                            <label for=" ot-impresion-color" class="form-label"><?= @lang("Produccion.impresion_color") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_color_at" id="ot-impresion-color" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["interior_color_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isCubierta"] ? "" : "d-none" ?>">
                            <label for="ot-cubierta" class="form-label"><?= @lang("Produccion.cubierta") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cubierta_at" id="ot-cubierta" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["cubierta_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isSobrecubierta"] ? "" : "d-none" ?>">
                            <label for="ot-sobrecubierta" class="form-label"><?= @lang("Produccion.sobrecubierta") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="sobrecubierta_at" id="ot-sobrecubierta" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["sobrecubierta_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isGuarda"] ? "" : "d-none" ?>">
                            <label for="ot-guarda" class="form-label"><?= @lang("Produccion.guarda") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="guarda_at" id="ot-guarda" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["guarda_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>

                    </div>
                    <div class="col-md-3">
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <h4 class="text-truncate"><?= lang("Produccion.progress_manipulado") ?></h4>
                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isPlastificado"] ? "" : "d-none" ?>">
                            <label for="ot-plastificado" class="form-label"><?= @lang("Produccion.plastificado") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="plastificado_at" id="ot-plastificado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["plastificado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isPlakene"] ? "" : "d-none" ?>">
                            <label for="ot-plakene" class="form-label"><?= @lang("Produccion.plakene") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="plakene_at" id="ot-plakene" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["plakene_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isRetractilado"] ? "" : "d-none" ?>">
                            <label for="ot-retractilado" class="form-label"><?= @lang("Produccion.retractilado") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado_at" id="ot-retractilado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["retractilado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isUVI"] ? "" : "d-none" ?>">
                            <label for="ot-uvi" class="form-label"><?= @lang("Produccion.uvi") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="uvi_at" id="ot-uvi" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["uvi_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isEstampado"] ? "" : "d-none" ?>">
                            <label for="ot-estampado" class="form-label"><?= @lang("Produccion.estampado") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="estampado_at" id="ot-estampado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["estampado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->cosido ? "" : "d-none" ?>">
                            <label for="ot-prep-cosido" class="form-label"><?= @lang("Produccion.cosido") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cosido_at" id="ot-prep-cosido" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["cosido_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isGrapado"] ? "" : "d-none" ?>">
                            <label for="ot-prep-grapado" class="form-label"><?= @lang("Produccion.grapado") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="grapado_at" id="ot-prep-grapado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["grapado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->solapas ? "" : "d-none" ?>">
                            <label for="ot-prep-solapa" class="form-label"><?= @lang("Produccion.solapa") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="solapa_at" id="ot-prep-solapa" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
                        </div>

                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->marcapaginas ? "" : "d-none" ?>">
                            <label for="ot-prep-marcapaginas" class="form-label"><?= @lang("Produccion.marcapaginas") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="marcapaginas_at" id="ot-prep-marcapaginas" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["marcapaginas_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isCorte"] ? "" : "d-none" ?>">
                            <label for="ot-prep-guillotina" class="form-label"><?= @lang("Produccion.guillotina") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="corte_at" id="ot-prep-guillotina" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["corte_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= count($ot->tareas_manipulado()) > 0 ? "" : "d-none" ?>">
                            <label for="ot-manipulado" class="form-label"><?= @lang("Produccion.manipulado") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="entrada_manipulado_at" id="ot-manipulado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"> <?= $user_dates["entrada_manipulado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= count($ot->tareas_encuadernado()) > 0 ? "" : "d-none" ?>">
                            <label for="ot-encuadernacion" class="form-label"><?= @lang("Produccion.encuadernacion") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="encuadernacion_at" id="ot-encuadernacion" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"> <?= $user_dates["encuadernacion_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                    </div>
                    <div class="col-md-3">
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <h4><?= lang("Produccion.progress_logistica") ?></h4>
                        </div>

                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <label for="ot-embalaje" class="form-label"><?= @lang("Produccion.embalaje") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="embalaje_at" id="ot-embalaje" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["embalaje_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>
                        <!-- Progress -->
                        <div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
                            <label for="ot-envio" class="form-label"><?= @lang("Produccion.envio") ?></label>
                            <div class="input-group">
                                <input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="envio_at" id="ot-envio" data-input <?= $is_finalizada ? "disabled" : "" ?>>
                                <button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
                            </div>
                            <div class="form-text"><?= $user_dates["envio_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>

                        </div>

                    </div>

                </div>

                <div class="row">
                    <div class="col-md-12">
                        <div class="d-flex flex-row justify-content-between align-items-center">
                            <label class="switch switch-danger switch-lg mt-1">
                                <input type="checkbox" class="switch-input ot-preview" id="ot-pedido-espera" name="is_pedido_espera" data-input <?= $is_finalizada ? "disabled" : "" ?> />
                                <span class="switch-toggle-slider">
                                    <span class="switch-on">
                                        <i class="ti ti-alert-triangle"></i>
                                    </span>
                                    <span class="switch-off">
                                        <i class="ti ti-x"></i>
                                    </span>
                                </span>
                                <span class="switch-label fw-lg"><?= @lang("Produccion.pedido_espera") ?></span>
                                <span class="badge text-bg-warning fw-lg" id="pedido_espera_by"></span>
                            </label>


                        </div>
                    </div>
                    <div class="col-md-12 mt-2">
                        <div class="d-flex flex-row justify-content-between align-items-center">

                            <label class="switch switch-success switch-lg mt-1">
                                <input type="checkbox" class="switch-input ot-preview" id="ot-preimpresion-revisada" name="preimpresion_revisada" data-input <?= $is_finalizada ? "disabled" : "" ?> />
                                <span class="switch-toggle-slider">
                                    <span class="switch-on">
                                        <i class="ti ti-check"></i>
                                    </span>
                                    <span class="switch-off">
                                        <i class="ti ti-x"></i>
                                    </span>
                                </span>
                                <span class="switch-label fw-lg"><?= @lang("Produccion.preimpresion_revisada") ?></span>
                                <span class="badge text-bg-primary fw-lg" id="preimpresion_revisada_by"></span>
                            </label>
                            <?php if ($is_finalizada): ?>
                                <button type="button" id="btn-reactivar-orden-pedido" class="btn btn-primary btn-block"><?= @lang("Produccion.reactivar_orden") ?></button>
                            <?php else: ?>
                                <button type="button" id="btn-finalizar-orden-pedido" class="btn btn-warning btn-block"><?= @lang("Produccion.finalizar_orden") ?></button>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>