/* ================================================================= */
/*   Estilos de detalle PEDIDO (copia exacta de ventas adaptada)    */
/* ================================================================= */

/* 1) Reduce paddings/fuente como en ventas */
#detalle-pedido #tablaDetalle {
  font-size: 0.9rem;
}
#detalle-pedido #tablaDetalle th,
#detalle-pedido #tablaDetalle td {
  vertical-align: middle;
  padding: 0.35rem !important;
}

/* 2) Inputs editables ancho fijo */
#detalle-pedido .edit {
  width: 80px;
}

/* 3) Columna CPN más estrecha */
#detalle-pedido #tablaDetalle th:nth-child(1),
#detalle-pedido #tablaDetalle td:nth-child(1) {
  width: 120px;
}

/* 4) Cant y $ Compra en negrilla azul y alineadas a la derecha */
#detalle-pedido #tablaDetalle th:nth-child(6),
#detalle-pedido #tablaDetalle td:nth-child(6),
#detalle-pedido #tablaDetalle th:nth-child(8),
#detalle-pedido #tablaDetalle td:nth-child(8) {
  font-weight: bold;
  color: #003366;
}
#detalle-pedido #tablaDetalle td:nth-child(6) input,
#detalle-pedido #tablaDetalle td:nth-child(8) input {
  text-align: right;
}

/* 5) % Imp en negrilla azul, centrada y columna angosta */
#detalle-pedido #tablaDetalle th:nth-child(9),
#detalle-pedido #tablaDetalle td:nth-child(9) {
  font-weight: bold;
  color: #003366;
  width: 40px;
}
#detalle-pedido #tablaDetalle td:nth-child(8) input {
  text-align: center;
}

/* 6) Entregado más estrecha */
#detalle-pedido #tablaDetalle th:nth-child(13),
#detalle-pedido #tablaDetalle td:nth-child(13) {
  width: 60px;
  text-align: center;
}

/* 7) Sin flechas en inputs numéricos */
#detalle-pedido #tablaDetalle input[type="number"]::-webkit-inner-spin-button,
#detalle-pedido #tablaDetalle input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#detalle-pedido #tablaDetalle input[type="number"] {
  -moz-appearance: textfield;
}

/* 9) Vr Unit & Total, sin padding extra */
#detalle-pedido #tablaDetalle td.unit-col,
#detalle-pedido #tablaDetalle td.total-col {
  padding: 0 !important;
}
#detalle-pedido #tablaDetalle td.unit-col div,
#detalle-pedido #tablaDetalle td.total-col div {
  display: block;
  width: 100%;
  min-width: 120px;
  padding: 0.5rem;
  box-sizing: border-box;
  margin: 0;
  text-align: right;
}
#detalle-pedido #tablaDetalle td.unit-col .before-tax {
  background: #ffe8a1;
  color: #856404;
}
#detalle-pedido #tablaDetalle td.unit-col .after-tax {
  background: #cfe2ff;
  color: #084298;
}
#detalle-pedido #tablaDetalle td.total-col .before-tax {
  background: #ffe8a1;
  color: #856404;
}
#detalle-pedido #tablaDetalle td.total-col .after-tax {
  background: #cfe2ff;
  color: #084298;
}

/* ===== Inputs Cant, $ Compra y % Imp en negrilla y azul ===== */
#detalle-pedido #tablaDetalle td:nth-child(6) input,
#detalle-pedido #tablaDetalle td:nth-child(8) input,
#detalle-pedido #tablaDetalle td:nth-child(9) input {
  font-weight: bold;
  color: #003366;
}

/* === Pedidos: estilos de resumen idénticos a ventas_resumen === */
#resumen-pedido .section {
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
  margin-bottom: 0.25rem;
}
#resumen-pedido .section:last-child {
  border: none;
}
#resumen-pedido .toggle-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  padding: 0.15rem 0;
  line-height: 1.2;
}
#resumen-pedido dl {
  margin-bottom: 0;
}
#resumen-pedido dl dt {
  float: left;
  font-weight: bold;
}
#resumen-pedido dl dd {
  margin-left: 0;
  text-align: right;
}
#resumen-pedido table {
  width: 100%;
  margin-bottom: 0;
}
#resumen-pedido .modal-content h5 {
  margin-top: 0;
  margin-bottom: 1rem;
}
